cuBNM 0.0.1__tar.gz → 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. cubnm-0.0.3/MANIFEST.in +3 -0
  2. cubnm-0.0.3/PKG-INFO +118 -0
  3. cubnm-0.0.3/README.rst +62 -0
  4. cubnm-0.0.3/include/cubnm/bnm.cuh +49 -0
  5. cubnm-0.0.3/include/cubnm/bnm.hpp +21 -0
  6. cubnm-0.0.3/include/cubnm/defines.h +56 -0
  7. cubnm-0.0.3/include/cubnm/fc.cuh +34 -0
  8. cubnm-0.0.3/include/cubnm/includes.cuh +29 -0
  9. cubnm-0.0.3/include/cubnm/models/base.cuh +4 -0
  10. cubnm-0.0.3/include/cubnm/models/base.hpp +296 -0
  11. cubnm-0.0.3/include/cubnm/models/boilerplate.hpp +264 -0
  12. cubnm-0.0.3/include/cubnm/models/bw.cuh +10 -0
  13. cubnm-0.0.3/include/cubnm/models/bw.hpp +24 -0
  14. cubnm-0.0.3/include/cubnm/models/kuramoto.cuh +13 -0
  15. cubnm-0.0.3/include/cubnm/models/kuramoto.hpp +49 -0
  16. cubnm-0.0.3/include/cubnm/models/rww.cuh +18 -0
  17. cubnm-0.0.3/include/cubnm/models/rww.hpp +128 -0
  18. cubnm-0.0.3/include/cubnm/models/rww_fic.hpp +19 -0
  19. cubnm-0.0.3/include/cubnm/models/rwwex.cuh +13 -0
  20. cubnm-0.0.3/include/cubnm/models/rwwex.hpp +57 -0
  21. cubnm-0.0.3/include/cubnm/utils.cuh +18 -0
  22. {cuBNM-0.0.1/src/cpp → cubnm-0.0.3/include/cubnm}/utils.hpp +5 -5
  23. {cuBNM-0.0.1 → cubnm-0.0.3}/pyproject.toml +24 -18
  24. {cuBNM-0.0.1 → cubnm-0.0.3}/setup.py +93 -46
  25. cubnm-0.0.3/src/cubnm/__init__.py +3 -0
  26. cubnm-0.0.3/src/cubnm/_core.py +17 -0
  27. cubnm-0.0.3/src/cubnm/_setup_opts.py +6 -0
  28. cubnm-0.0.3/src/cubnm/_version.py +21 -0
  29. cubnm-0.0.3/src/cubnm/cli.py +153 -0
  30. cubnm-0.0.3/src/cubnm/cli_parser.py +203 -0
  31. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-fcgradient01_zscore.txt +100 -0
  32. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-gabaa_zscore.txt +100 -0
  33. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-genepc1_zscore.txt +100 -0
  34. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-myelinmap_zscore.txt +100 -0
  35. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-nmda_zscore.txt +100 -0
  36. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-thickness_zscore.txt +100 -0
  37. cubnm-0.0.3/src/cubnm/datasets.py +143 -0
  38. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/optimize.py +427 -114
  39. cubnm-0.0.3/src/cubnm/sim.py +1057 -0
  40. cubnm-0.0.3/src/cubnm/utils.py +85 -0
  41. cubnm-0.0.3/src/cubnm.egg-info/PKG-INFO +118 -0
  42. {cuBNM-0.0.1/src/cuBNM.egg-info → cubnm-0.0.3/src/cubnm.egg-info}/SOURCES.txt +74 -39
  43. cubnm-0.0.3/src/cubnm.egg-info/entry_points.txt +2 -0
  44. {cuBNM-0.0.1/src/cuBNM.egg-info → cubnm-0.0.3/src/cubnm.egg-info}/requires.txt +2 -1
  45. cubnm-0.0.3/src/cubnm.egg-info/top_level.txt +2 -0
  46. cubnm-0.0.3/src/ext/bnm.cpp +781 -0
  47. cubnm-0.0.3/src/ext/bnm.cu +1630 -0
  48. cubnm-0.0.3/src/ext/core.cpp +564 -0
  49. cubnm-0.0.3/src/ext/fc.cpp +92 -0
  50. cubnm-0.0.3/src/ext/fc.cu +226 -0
  51. cubnm-0.0.3/src/ext/models/base.cpp +13 -0
  52. cubnm-0.0.3/src/ext/models/bw.cpp +35 -0
  53. cubnm-0.0.3/src/ext/models/bw.cu +15 -0
  54. cubnm-0.0.3/src/ext/models/kuramoto.cpp +44 -0
  55. cubnm-0.0.3/src/ext/models/kuramoto.cu +37 -0
  56. cubnm-0.0.3/src/ext/models/rww.cpp +306 -0
  57. cubnm-0.0.3/src/ext/models/rww.cu +151 -0
  58. cubnm-0.0.3/src/ext/models/rww_fic.cpp +199 -0
  59. cubnm-0.0.3/src/ext/models/rwwex.cpp +59 -0
  60. cubnm-0.0.3/src/ext/models/rwwex.cu +44 -0
  61. {cuBNM-0.0.1/src/cpp → cubnm-0.0.3/src/ext}/utils.cpp +18 -19
  62. cubnm-0.0.3/src/ext/utils.cu +56 -0
  63. cuBNM-0.0.1/MANIFEST.in +0 -4
  64. cuBNM-0.0.1/PKG-INFO +0 -80
  65. cuBNM-0.0.1/README.md +0 -25
  66. cuBNM-0.0.1/src/cpp/bnm.cpp +0 -646
  67. cuBNM-0.0.1/src/cpp/constants.cpp +0 -125
  68. cuBNM-0.0.1/src/cpp/constants.hpp +0 -117
  69. cuBNM-0.0.1/src/cpp/fic.cpp +0 -359
  70. cuBNM-0.0.1/src/cpp/run_simulations.cpp +0 -273
  71. cuBNM-0.0.1/src/cuBNM/__init__.py +0 -1
  72. cuBNM-0.0.1/src/cuBNM/_run_simulations.py +0 -18
  73. cuBNM-0.0.1/src/cuBNM/_setup_flags.py +0 -3
  74. cuBNM-0.0.1/src/cuBNM/data/ctx_parc-schaefer-100_desc-6maps_minmax.txt +0 -6
  75. cuBNM-0.0.1/src/cuBNM/data/ctx_parc-schaefer-100_desc-6maps_zscore.txt +0 -6
  76. cuBNM-0.0.1/src/cuBNM/datasets.py +0 -104
  77. cuBNM-0.0.1/src/cuBNM/sim.py +0 -324
  78. cuBNM-0.0.1/src/cuBNM/utils.py +0 -20
  79. cuBNM-0.0.1/src/cuBNM.egg-info/PKG-INFO +0 -80
  80. cuBNM-0.0.1/src/cuBNM.egg-info/top_level.txt +0 -3
  81. cuBNM-0.0.1/src/cuda/bnm.cu +0 -1308
  82. cuBNM-0.0.1/tests/test_core.py +0 -179
  83. {cuBNM-0.0.1 → cubnm-0.0.3}/LICENSE +0 -0
  84. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_blas.h +0 -0
  85. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_blas_types.h +0 -0
  86. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block.h +0 -0
  87. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_char.h +0 -0
  88. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_complex_double.h +0 -0
  89. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_complex_float.h +0 -0
  90. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_complex_long_double.h +0 -0
  91. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_double.h +0 -0
  92. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_float.h +0 -0
  93. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_int.h +0 -0
  94. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_long.h +0 -0
  95. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_long_double.h +0 -0
  96. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_short.h +0 -0
  97. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_uchar.h +0 -0
  98. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_uint.h +0 -0
  99. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_ulong.h +0 -0
  100. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_block_ushort.h +0 -0
  101. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_bspline.h +0 -0
  102. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_bst.h +0 -0
  103. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_bst_avl.h +0 -0
  104. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_bst_rb.h +0 -0
  105. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_bst_types.h +0 -0
  106. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_cblas.h +0 -0
  107. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_cdf.h +0 -0
  108. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_chebyshev.h +0 -0
  109. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_check_range.h +0 -0
  110. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_combination.h +0 -0
  111. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_complex.h +0 -0
  112. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_complex_math.h +0 -0
  113. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_const.h +0 -0
  114. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_const_cgs.h +0 -0
  115. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_const_cgsm.h +0 -0
  116. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_const_mks.h +0 -0
  117. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_const_mksa.h +0 -0
  118. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_const_num.h +0 -0
  119. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_deriv.h +0 -0
  120. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_dft_complex.h +0 -0
  121. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_dft_complex_float.h +0 -0
  122. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_dht.h +0 -0
  123. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_diff.h +0 -0
  124. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_eigen.h +0 -0
  125. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_errno.h +0 -0
  126. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_fft.h +0 -0
  127. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_fft_complex.h +0 -0
  128. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_fft_complex_float.h +0 -0
  129. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_fft_halfcomplex.h +0 -0
  130. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_fft_halfcomplex_float.h +0 -0
  131. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_fft_real.h +0 -0
  132. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_fft_real_float.h +0 -0
  133. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_filter.h +0 -0
  134. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_fit.h +0 -0
  135. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_heapsort.h +0 -0
  136. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_histogram.h +0 -0
  137. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_histogram2d.h +0 -0
  138. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_ieee_utils.h +0 -0
  139. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_inline.h +0 -0
  140. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_integration.h +0 -0
  141. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_interp.h +0 -0
  142. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_interp2d.h +0 -0
  143. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_linalg.h +0 -0
  144. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_machine.h +0 -0
  145. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_math.h +0 -0
  146. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix.h +0 -0
  147. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_char.h +0 -0
  148. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_complex_double.h +0 -0
  149. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_complex_float.h +0 -0
  150. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_complex_long_double.h +0 -0
  151. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_double.h +0 -0
  152. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_float.h +0 -0
  153. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_int.h +0 -0
  154. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_long.h +0 -0
  155. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_long_double.h +0 -0
  156. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_short.h +0 -0
  157. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_uchar.h +0 -0
  158. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_uint.h +0 -0
  159. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_ulong.h +0 -0
  160. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_matrix_ushort.h +0 -0
  161. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_message.h +0 -0
  162. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_min.h +0 -0
  163. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_minmax.h +0 -0
  164. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_mode.h +0 -0
  165. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_monte.h +0 -0
  166. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_monte_miser.h +0 -0
  167. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_monte_plain.h +0 -0
  168. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_monte_vegas.h +0 -0
  169. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_movstat.h +0 -0
  170. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_multifit.h +0 -0
  171. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_multifit_nlin.h +0 -0
  172. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_multifit_nlinear.h +0 -0
  173. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_multilarge.h +0 -0
  174. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_multilarge_nlinear.h +0 -0
  175. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_multimin.h +0 -0
  176. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_multiroots.h +0 -0
  177. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_multiset.h +0 -0
  178. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_nan.h +0 -0
  179. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_ntuple.h +0 -0
  180. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_odeiv.h +0 -0
  181. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_odeiv2.h +0 -0
  182. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permutation.h +0 -0
  183. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute.h +0 -0
  184. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_char.h +0 -0
  185. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_complex_double.h +0 -0
  186. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_complex_float.h +0 -0
  187. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_complex_long_double.h +0 -0
  188. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_double.h +0 -0
  189. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_float.h +0 -0
  190. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_int.h +0 -0
  191. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_long.h +0 -0
  192. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_long_double.h +0 -0
  193. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix.h +0 -0
  194. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_char.h +0 -0
  195. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_complex_double.h +0 -0
  196. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_complex_float.h +0 -0
  197. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_complex_long_double.h +0 -0
  198. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_double.h +0 -0
  199. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_float.h +0 -0
  200. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_int.h +0 -0
  201. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_long.h +0 -0
  202. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_long_double.h +0 -0
  203. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_short.h +0 -0
  204. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_uchar.h +0 -0
  205. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_uint.h +0 -0
  206. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_ulong.h +0 -0
  207. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_ushort.h +0 -0
  208. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_short.h +0 -0
  209. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_uchar.h +0 -0
  210. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_uint.h +0 -0
  211. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_ulong.h +0 -0
  212. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_ushort.h +0 -0
  213. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector.h +0 -0
  214. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_char.h +0 -0
  215. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_complex_double.h +0 -0
  216. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_complex_float.h +0 -0
  217. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_complex_long_double.h +0 -0
  218. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_double.h +0 -0
  219. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_float.h +0 -0
  220. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_int.h +0 -0
  221. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_long.h +0 -0
  222. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_long_double.h +0 -0
  223. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_short.h +0 -0
  224. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_uchar.h +0 -0
  225. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_uint.h +0 -0
  226. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_ulong.h +0 -0
  227. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_ushort.h +0 -0
  228. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_poly.h +0 -0
  229. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_pow_int.h +0 -0
  230. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_precision.h +0 -0
  231. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_qrng.h +0 -0
  232. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_randist.h +0 -0
  233. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_rng.h +0 -0
  234. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_roots.h +0 -0
  235. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_rstat.h +0 -0
  236. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf.h +0 -0
  237. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_airy.h +0 -0
  238. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_bessel.h +0 -0
  239. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_clausen.h +0 -0
  240. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_coulomb.h +0 -0
  241. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_coupling.h +0 -0
  242. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_dawson.h +0 -0
  243. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_debye.h +0 -0
  244. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_dilog.h +0 -0
  245. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_elementary.h +0 -0
  246. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_ellint.h +0 -0
  247. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_elljac.h +0 -0
  248. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_erf.h +0 -0
  249. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_exp.h +0 -0
  250. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_expint.h +0 -0
  251. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_fermi_dirac.h +0 -0
  252. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_gamma.h +0 -0
  253. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_gegenbauer.h +0 -0
  254. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_hermite.h +0 -0
  255. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_hyperg.h +0 -0
  256. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_laguerre.h +0 -0
  257. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_lambert.h +0 -0
  258. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_legendre.h +0 -0
  259. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_log.h +0 -0
  260. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_mathieu.h +0 -0
  261. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_pow_int.h +0 -0
  262. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_psi.h +0 -0
  263. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_result.h +0 -0
  264. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_sincos_pi.h +0 -0
  265. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_synchrotron.h +0 -0
  266. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_transport.h +0 -0
  267. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_trig.h +0 -0
  268. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sf_zeta.h +0 -0
  269. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_siman.h +0 -0
  270. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort.h +0 -0
  271. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_char.h +0 -0
  272. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_double.h +0 -0
  273. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_float.h +0 -0
  274. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_int.h +0 -0
  275. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_long.h +0 -0
  276. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_long_double.h +0 -0
  277. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_short.h +0 -0
  278. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_uchar.h +0 -0
  279. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_uint.h +0 -0
  280. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_ulong.h +0 -0
  281. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_ushort.h +0 -0
  282. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector.h +0 -0
  283. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_char.h +0 -0
  284. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_double.h +0 -0
  285. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_float.h +0 -0
  286. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_int.h +0 -0
  287. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_long.h +0 -0
  288. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_long_double.h +0 -0
  289. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_short.h +0 -0
  290. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_uchar.h +0 -0
  291. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_uint.h +0 -0
  292. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_ulong.h +0 -0
  293. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_ushort.h +0 -0
  294. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spblas.h +0 -0
  295. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_specfunc.h +0 -0
  296. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_splinalg.h +0 -0
  297. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spline.h +0 -0
  298. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spline2d.h +0 -0
  299. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix.h +0 -0
  300. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_char.h +0 -0
  301. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_complex_double.h +0 -0
  302. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_complex_float.h +0 -0
  303. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_complex_long_double.h +0 -0
  304. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_double.h +0 -0
  305. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_float.h +0 -0
  306. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_int.h +0 -0
  307. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_long.h +0 -0
  308. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_long_double.h +0 -0
  309. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_short.h +0 -0
  310. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_uchar.h +0 -0
  311. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_uint.h +0 -0
  312. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_ulong.h +0 -0
  313. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_ushort.h +0 -0
  314. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics.h +0 -0
  315. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_char.h +0 -0
  316. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_double.h +0 -0
  317. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_float.h +0 -0
  318. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_int.h +0 -0
  319. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_long.h +0 -0
  320. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_long_double.h +0 -0
  321. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_short.h +0 -0
  322. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_uchar.h +0 -0
  323. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_uint.h +0 -0
  324. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_ulong.h +0 -0
  325. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_statistics_ushort.h +0 -0
  326. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sum.h +0 -0
  327. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_sys.h +0 -0
  328. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_test.h +0 -0
  329. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_types.h +0 -0
  330. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector.h +0 -0
  331. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_char.h +0 -0
  332. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_complex.h +0 -0
  333. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_complex_double.h +0 -0
  334. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_complex_float.h +0 -0
  335. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_complex_long_double.h +0 -0
  336. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_double.h +0 -0
  337. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_float.h +0 -0
  338. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_int.h +0 -0
  339. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_long.h +0 -0
  340. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_long_double.h +0 -0
  341. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_short.h +0 -0
  342. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_uchar.h +0 -0
  343. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_uint.h +0 -0
  344. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_ulong.h +0 -0
  345. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_vector_ushort.h +0 -0
  346. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_version.h +0 -0
  347. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_wavelet.h +0 -0
  348. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/gsl_wavelet2d.h +0 -0
  349. {cuBNM-0.0.1 → cubnm-0.0.3}/include/gsl/test_source.c +0 -0
  350. {cuBNM-0.0.1 → cubnm-0.0.3}/setup.cfg +0 -0
  351. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-aparc_approach-median_mean001_desc-length.txt +0 -0
  352. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-aparc_approach-median_mean001_desc-strength.txt +0 -0
  353. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-100_approach-median_mean001_desc-length.txt +0 -0
  354. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-100_approach-median_mean001_desc-strength.txt +0 -0
  355. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-100_desc-yeo7.txt +0 -0
  356. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-100_hemi-LR_desc-FCDtril.txt +0 -0
  357. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-100_hemi-LR_desc-FCtril.txt +0 -0
  358. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-100_hemi-LR_exc-inter_desc-FCDtril.txt +0 -0
  359. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-100_hemi-LR_exc-inter_desc-FCtril.txt +0 -0
  360. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-200_approach-median_mean001_desc-length.txt +0 -0
  361. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-200_approach-median_mean001_desc-strength.txt +0 -0
  362. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-400_approach-median_mean001_desc-length.txt +0 -0
  363. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-400_approach-median_mean001_desc-strength.txt +0 -0
  364. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-600_approach-median_mean001_desc-length.txt +0 -0
  365. {cuBNM-0.0.1/src/cuBNM → cubnm-0.0.3/src/cubnm}/data/ctx_parc-schaefer-600_approach-median_mean001_desc-strength.txt +0 -0
  366. {cuBNM-0.0.1/src/cuBNM.egg-info → cubnm-0.0.3/src/cubnm.egg-info}/dependency_links.txt +0 -0
@@ -0,0 +1,3 @@
1
+ recursive-include src/ext *
2
+ recursive-include include *
3
+ recursive-include src/cubnm/data *
cubnm-0.0.3/PKG-INFO ADDED
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.1
2
+ Name: cubnm
3
+ Version: 0.0.3
4
+ Summary: A toolbox for biophysical network modeling on GPUs
5
+ Author-email: Amin Saberi <amnsbr@gmail.com>
6
+ License: BSD 3-Clause License
7
+
8
+ Copyright (c) 2023, cuBNM Developers
9
+
10
+ Redistribution and use in source and binary forms, with or without
11
+ modification, are permitted provided that the following conditions are met:
12
+
13
+ 1. Redistributions of source code must retain the above copyright notice, this
14
+ list of conditions and the following disclaimer.
15
+
16
+ 2. Redistributions in binary form must reproduce the above copyright notice,
17
+ this list of conditions and the following disclaimer in the documentation
18
+ and/or other materials provided with the distribution.
19
+
20
+ 3. Neither the name of the copyright holder nor the names of its
21
+ contributors may be used to endorse or promote products derived from
22
+ this software without specific prior written permission.
23
+
24
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
+
35
+ Classifier: Development Status :: 3 - Alpha
36
+ Classifier: Intended Audience :: Science/Research
37
+ Classifier: Intended Audience :: Developers
38
+ Classifier: Programming Language :: C
39
+ Classifier: Programming Language :: C++
40
+ Classifier: Programming Language :: Python
41
+ Classifier: Programming Language :: Python :: 3
42
+ Classifier: Programming Language :: Python :: 3 :: Only
43
+ Classifier: Operating System :: Unix
44
+ Classifier: Environment :: GPU :: NVIDIA CUDA
45
+ Classifier: Topic :: Scientific/Engineering
46
+ Requires-Python: >=3.7
47
+ Description-Content-Type: text/x-rst
48
+ License-File: LICENSE
49
+ Requires-Dist: numpy<2,>=1.20
50
+ Requires-Dist: GPUtil==1.4
51
+ Requires-Dist: scipy
52
+ Requires-Dist: pandas
53
+ Requires-Dist: pymoo==0.6
54
+ Requires-Dist: scikit-optimize==0.9
55
+ Requires-Dist: tabulate
56
+
57
+ .. image:: https://raw.githubusercontent.com/amnsbr/cubnm/main/docs/_static/logo_text.png
58
+ :width: 400px
59
+ :align: center
60
+
61
+ .. image:: https://img.shields.io/pypi/v/cubnm
62
+ :target: https://pypi.org/project/cubnm/
63
+
64
+ .. image:: https://img.shields.io/readthedocs/cubnm
65
+ :target: https://cubnm.readthedocs.io
66
+
67
+ .. image:: https://img.shields.io/badge/docker-amnsbr/cubnm-blue.svg?logo=docker
68
+ :target: https://hub.docker.com/r/amnsbr/cubnm
69
+
70
+ .. image:: https://app.codacy.com/project/badge/Grade/e1af99e878bc4dbf9525d8eb610e0026
71
+ :target: https://app.codacy.com/gh/amnsbr/cubnm/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
72
+
73
+ .. image:: https://img.shields.io/github/license/amnsbr/cubnm
74
+ :target: ./LICENSE
75
+
76
+ cuBNM toolbox is designed for efficient biophysical network modeling of
77
+ the brain on GPUs and CPUs.
78
+
79
+ Overview
80
+ --------
81
+ cuBNM toolbox simulates neuronal activity of network nodes (neural mass models)
82
+ which are connected through the structural connectome using GPUs/CPUs.
83
+ Currently three models (`rWW`, `rWWEx` and `Kuramoto`) are implemented, but the
84
+ modular design of the code makes it possible to include additional models in
85
+ future. The simulated activity of model neurons is fed into the Balloon-Windkessel
86
+ model to calculate simulated BOLD signal. Functional connectivity (FC) and
87
+ functional connectivity dynamics (FCD) from the simulated BOLD signal are
88
+ calculated efficiently on GPUs/CPUs and compared to FC and FCD matrices
89
+ derived from empirical BOLD signals to assess similarity (goodness-of-fit)
90
+ of the simulated to empirical BOLD signal.
91
+
92
+ The toolbox supports parameter optimization algorithms including grid search and
93
+ evolutionary optimizers (via `pymoo`), such as the covariance matrix adaptation-evolution
94
+ strategy (CMA-ES). Parallelization within the grid or the iterations of
95
+ evolutionary optimization is done at the level of simulations (across the GPU
96
+ ‘blocks’), and nodes (across each block’s ‘threads’). The models can incorporate
97
+ global or regional free parameters that are fit to empirical data using the
98
+ provided optimization algorithms. Regional parameters can be homogeneous or vary
99
+ across nodes based on a parameterized combination of fixed maps or independent
100
+ free parameters for each node or group of nodes.
101
+
102
+ GPU usage is the primary focus of the toolbox but it also supports running the
103
+ simulations on single or multiple cores of CPU. CPUs will be used if no GPUs are
104
+ detected or if requested by the user.
105
+
106
+ At its core the toolbox runs highly parallelized simulations using C++/CUDA, while the
107
+ user interface is written in Python and allows for user control over simulation
108
+ configurations:
109
+
110
+ .. image:: https://raw.githubusercontent.com/amnsbr/cubnm/main/docs/_static/flowchart_extended.png
111
+ :alt: Flowchart of the cuBNM program
112
+
113
+ .. overview-end
114
+
115
+ Documentation
116
+ -------------
117
+ Please find the documentations on installation, usage examples and API at
118
+ https://cubnm.readthedocs.io.
cubnm-0.0.3/README.rst ADDED
@@ -0,0 +1,62 @@
1
+ .. image:: https://raw.githubusercontent.com/amnsbr/cubnm/main/docs/_static/logo_text.png
2
+ :width: 400px
3
+ :align: center
4
+
5
+ .. image:: https://img.shields.io/pypi/v/cubnm
6
+ :target: https://pypi.org/project/cubnm/
7
+
8
+ .. image:: https://img.shields.io/readthedocs/cubnm
9
+ :target: https://cubnm.readthedocs.io
10
+
11
+ .. image:: https://img.shields.io/badge/docker-amnsbr/cubnm-blue.svg?logo=docker
12
+ :target: https://hub.docker.com/r/amnsbr/cubnm
13
+
14
+ .. image:: https://app.codacy.com/project/badge/Grade/e1af99e878bc4dbf9525d8eb610e0026
15
+ :target: https://app.codacy.com/gh/amnsbr/cubnm/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade
16
+
17
+ .. image:: https://img.shields.io/github/license/amnsbr/cubnm
18
+ :target: ./LICENSE
19
+
20
+ cuBNM toolbox is designed for efficient biophysical network modeling of
21
+ the brain on GPUs and CPUs.
22
+
23
+ Overview
24
+ --------
25
+ cuBNM toolbox simulates neuronal activity of network nodes (neural mass models)
26
+ which are connected through the structural connectome using GPUs/CPUs.
27
+ Currently three models (`rWW`, `rWWEx` and `Kuramoto`) are implemented, but the
28
+ modular design of the code makes it possible to include additional models in
29
+ future. The simulated activity of model neurons is fed into the Balloon-Windkessel
30
+ model to calculate simulated BOLD signal. Functional connectivity (FC) and
31
+ functional connectivity dynamics (FCD) from the simulated BOLD signal are
32
+ calculated efficiently on GPUs/CPUs and compared to FC and FCD matrices
33
+ derived from empirical BOLD signals to assess similarity (goodness-of-fit)
34
+ of the simulated to empirical BOLD signal.
35
+
36
+ The toolbox supports parameter optimization algorithms including grid search and
37
+ evolutionary optimizers (via `pymoo`), such as the covariance matrix adaptation-evolution
38
+ strategy (CMA-ES). Parallelization within the grid or the iterations of
39
+ evolutionary optimization is done at the level of simulations (across the GPU
40
+ ‘blocks’), and nodes (across each block’s ‘threads’). The models can incorporate
41
+ global or regional free parameters that are fit to empirical data using the
42
+ provided optimization algorithms. Regional parameters can be homogeneous or vary
43
+ across nodes based on a parameterized combination of fixed maps or independent
44
+ free parameters for each node or group of nodes.
45
+
46
+ GPU usage is the primary focus of the toolbox but it also supports running the
47
+ simulations on single or multiple cores of CPU. CPUs will be used if no GPUs are
48
+ detected or if requested by the user.
49
+
50
+ At its core the toolbox runs highly parallelized simulations using C++/CUDA, while the
51
+ user interface is written in Python and allows for user control over simulation
52
+ configurations:
53
+
54
+ .. image:: https://raw.githubusercontent.com/amnsbr/cubnm/main/docs/_static/flowchart_extended.png
55
+ :alt: Flowchart of the cuBNM program
56
+
57
+ .. overview-end
58
+
59
+ Documentation
60
+ -------------
61
+ Please find the documentations on installation, usage examples and API at
62
+ https://cubnm.readthedocs.io.
@@ -0,0 +1,49 @@
1
+ #ifndef BNM_CUH
2
+ #define BNM_CUH
3
+ #include "bnm.hpp"
4
+
5
+ typedef void (*GlobalInputKernel)(
6
+ u_real&, int&,
7
+ const int&, const int&, const int&,
8
+ int&, int&, u_real*,
9
+ int**, const bool&, const int&,
10
+ u_real**, u_real*
11
+ );
12
+
13
+ __device__ void global_input_cond(
14
+ u_real& tmp_globalinput, int& k_buff_idx,
15
+ const int& nodes, const int& sim_idx, const int& j,
16
+ int& k, int& buff_idx, u_real* _SC,
17
+ int** delay, const bool& has_delay, const int& max_delay,
18
+ u_real** conn_state_var_hist, u_real* conn_state_var_1
19
+ );
20
+
21
+ __device__ void global_input_osc(
22
+ u_real& tmp_globalinput, int& k_buff_idx,
23
+ const int& nodes, const int& sim_idx, const int& j,
24
+ int& k, int& buff_idx, u_real* _SC,
25
+ int** delay, const bool& has_delay, const int& max_delay,
26
+ u_real** conn_state_var_hist, u_real* conn_state_var_1
27
+ );
28
+
29
+ template<typename Model>
30
+ __global__ void bnm(
31
+ Model* model,
32
+ u_real **BOLD,
33
+ u_real ***state_vars_out,
34
+ int **global_out_int,
35
+ bool **global_out_bool,
36
+ int n_vols_remove,
37
+ u_real *SC, u_real **global_params, u_real **regional_params,
38
+ u_real **conn_state_var_hist, int **delay, int max_delay,
39
+ int N_SIMS, int nodes, int BOLD_TR, int time_steps,
40
+ u_real *noise,
41
+ bool extended_output,
42
+ #ifdef NOISE_SEGMENT
43
+ int *shuffled_nodes, int *shuffled_ts,
44
+ int noise_time_steps, int noise_repeats,
45
+ #endif
46
+ int corr_len
47
+ );
48
+
49
+ #endif
@@ -0,0 +1,21 @@
1
+ #ifndef BNM_HPP
2
+ #define BNM_HPP
3
+ template <typename Model>
4
+ void _run_simulations_cpu(
5
+ double * BOLD_ex_out, double * fc_trils_out, double * fcd_trils_out,
6
+ u_real ** global_params, u_real ** regional_params, u_real * v_list,
7
+ u_real * SC, u_real * SC_dist, BaseModel* m
8
+ );
9
+
10
+ template <typename Model>
11
+ void _init_cpu(BaseModel *m);
12
+
13
+ typedef void (*HGlobalInputFunc)(
14
+ u_real&, int&,
15
+ const int&, const int&,
16
+ int&, int&, u_real*,
17
+ int*, const bool&, const int&,
18
+ u_real*, u_real*
19
+ );
20
+
21
+ #endif
@@ -0,0 +1,56 @@
1
+ // Using floats vs doubles in the simulations, pass -D USE_FLOATS=1 to compiler to use floats
2
+ // Note that this does not affect FIC, CMAES and GOF calculations (always using doubles)
3
+ // as well as the noise array (always generated as floats, but then casted to u_real)
4
+ #ifdef USE_FLOATS
5
+ typedef float u_real;
6
+ #define EXP expf
7
+ #define POW powf
8
+ #define SQRT sqrtf
9
+ #define SIN sinf
10
+ #define FMOD fmodf
11
+ #define CUDA_MAX fmaxf
12
+ #define CUDA_MIN fminf
13
+ #else
14
+ typedef double u_real;
15
+ #define EXP exp
16
+ #define POW pow
17
+ #define SQRT sqrt
18
+ #define SIN sin
19
+ #define FMOD fmod
20
+ #define CUDA_MAX max
21
+ #define CUDA_MIN min
22
+ #endif
23
+ #define PI 3.14159265358979323846
24
+
25
+ #ifndef MAX_NODES_REG
26
+ #define MAX_NODES_REG 200
27
+ #endif
28
+ #ifndef MAX_NODES_MANY
29
+ #define MAX_NODES_MANY 500
30
+ #endif
31
+ #ifndef MANY_NODES
32
+ #define MAX_NODES MAX_NODES_REG
33
+ #define __NOINLINE__
34
+ #else
35
+ #define MAX_NODES MAX_NODES_MANY
36
+ #define __NOINLINE__ __noinline__
37
+ // in this case some __device__ kernels will be __noinline__ to avoid
38
+ // using too much registers which would lead to
39
+ // "too many resources requested for launch"
40
+ #endif
41
+
42
+ #ifdef __CUDACC__
43
+ #define CUDA_CALLABLE_MEMBER __device__
44
+ #else
45
+ #define CUDA_CALLABLE_MEMBER
46
+ #endif
47
+
48
+ #if defined(__CUDACC__) || defined(GPU_ENABLED)
49
+ #define _GPU_ENABLED
50
+ // this is used to determine if the GPU-related
51
+ // declarations should be done, either if
52
+ // nvcc is compiling the cuda source code
53
+ // or the C++ is being compiled but will be
54
+ // linked with the nvcc compiled library
55
+ // i.e., GPU_ENABLED is defined
56
+ #endif
@@ -0,0 +1,34 @@
1
+ __global__ void bold_stats(
2
+ u_real **mean_bold, u_real **ssd_bold,
3
+ u_real **BOLD, int N_SIMS, int nodes,
4
+ int bold_len, int corr_len, int n_vols_remove);
5
+
6
+ __global__ void window_bold_stats(
7
+ u_real **BOLD, int N_SIMS, int nodes,
8
+ int n_windows, int window_size_1, int *window_starts, int *window_ends,
9
+ u_real **windows_mean_bold, u_real **windows_ssd_bold);
10
+
11
+ __global__ void fc(u_real **fc_trils, u_real **windows_fc_trils,
12
+ u_real **BOLD, int N_SIMS, int nodes, int n_pairs, int *pairs_i,
13
+ int *pairs_j, int bold_len, int n_vols_remove,
14
+ int corr_len, u_real **mean_bold, u_real **ssd_bold,
15
+ int n_windows, int window_size_1, u_real **windows_mean_bold, u_real **windows_ssd_bold,
16
+ int *window_starts, int *window_ends,
17
+ int maxThreadsPerBlock);
18
+
19
+ __global__ void window_fc_stats(
20
+ u_real **windows_mean_fc, u_real **windows_ssd_fc,
21
+ u_real **L_windows_mean_fc, u_real **L_windows_ssd_fc,
22
+ u_real **R_windows_mean_fc, u_real **R_windows_ssd_fc,
23
+ u_real **windows_fc_trils, int N_SIMS, int n_windows, int n_pairs,
24
+ bool save_hemis, int n_pairs_hemi);
25
+
26
+ __global__ void fcd(
27
+ u_real **fcd_trils, u_real **L_fcd_trils, u_real **R_fcd_trils,
28
+ u_real **windows_fc_trils,
29
+ u_real **windows_mean_fc, u_real **windows_ssd_fc,
30
+ u_real **L_windows_mean_fc, u_real **L_windows_ssd_fc,
31
+ u_real **R_windows_mean_fc, u_real **R_windows_ssd_fc,
32
+ int N_SIMS, int n_pairs, int n_windows, int n_window_pairs,
33
+ int *window_pairs_i, int *window_pairs_j, int maxThreadsPerBlock,
34
+ bool save_hemis, int n_pairs_hemi);
@@ -0,0 +1,29 @@
1
+ #ifndef INCLUDES_CUH
2
+ #define INCLUDES_CUH
3
+
4
+ #include <stdio.h>
5
+ #include <stdlib.h>
6
+ #include <time.h>
7
+ #include <string.h>
8
+ #include <math.h>
9
+ #include <iostream>
10
+ #include <fstream>
11
+ #include <cmath>
12
+ #include <string>
13
+ #include <cstdlib>
14
+ #include <cuda_runtime.h>
15
+ #include <cooperative_groups.h>
16
+ #include <random>
17
+ #include <algorithm>
18
+ #include <map>
19
+ #include <gsl/gsl_matrix_double.h>
20
+ #include <gsl/gsl_vector_double.h>
21
+ #include <gsl/gsl_blas.h>
22
+ #include <gsl/gsl_math.h>
23
+ #include <gsl/gsl_errno.h>
24
+ #include <gsl/gsl_roots.h>
25
+ #include <thread>
26
+ #include <chrono>
27
+ #include <iomanip>
28
+
29
+ #endif
@@ -0,0 +1,4 @@
1
+ #ifndef BASE_CUH
2
+ #define BASE_CUH
3
+ #include "base.hpp"
4
+ #endif
@@ -0,0 +1,296 @@
1
+ #ifndef BASE_HPP
2
+ #define BASE_HPP
3
+ #include "cubnm/models/bw.hpp" // will be used by all derived models
4
+ #include "cubnm/models/boilerplate.hpp"
5
+
6
+ class BaseModel {
7
+ public:
8
+ BaseModel(
9
+ int nodes, int N_SIMS, int N_SCs, int BOLD_TR, int states_sampling,
10
+ int time_steps, bool do_delay, int window_size, int window_step, int rand_seed
11
+ ) : nodes{nodes},
12
+ N_SIMS{N_SIMS},
13
+ N_SCs{N_SCs},
14
+ BOLD_TR{BOLD_TR},
15
+ states_sampling{states_sampling},
16
+ time_steps{time_steps},
17
+ do_delay{do_delay},
18
+ window_size{window_size},
19
+ window_step{window_step},
20
+ rand_seed{rand_seed}
21
+ {
22
+ set_bold_states_len();
23
+ };
24
+ // create virtual destructor and free
25
+ // the memory allocated for the arrays
26
+ virtual ~BaseModel() = default;
27
+
28
+ static constexpr char *name = "Base";
29
+
30
+ virtual void update(
31
+ int nodes, int N_SIMS, int N_SCs, int BOLD_TR, int states_sampling,
32
+ int time_steps, bool do_delay, int window_size, int window_step, int rand_seed
33
+ ) {
34
+ this->nodes = nodes;
35
+ this->N_SIMS = N_SIMS;
36
+ this->N_SCs = N_SCs;
37
+ this->BOLD_TR = BOLD_TR;
38
+ this->states_sampling = states_sampling;
39
+ this->time_steps = time_steps;
40
+ this->do_delay = do_delay;
41
+ this->window_size = window_size;
42
+ this->window_step = window_step;
43
+ this->rand_seed = rand_seed;
44
+ this->set_bold_states_len();
45
+ }
46
+
47
+ virtual void set_bold_states_len() {
48
+ // bold samples (volumes) length
49
+ // and total matrix size
50
+ bold_len = time_steps / BOLD_TR;
51
+ bold_size = bold_len * nodes;
52
+ // states samples length and
53
+ // total matrix size
54
+ states_len = time_steps / states_sampling;
55
+ states_size = states_len * nodes;
56
+ }
57
+
58
+ virtual void free_cpu();
59
+
60
+ int nodes{}, N_SIMS{}, N_SCs{}, BOLD_TR{}, states_sampling{}, time_steps{},
61
+ window_size{}, window_step{}, rand_seed{}, n_pairs{}, n_windows{},
62
+ n_window_pairs{}, bold_len{}, bold_size{}, states_len{}, states_size{},
63
+ n_vols_remove{}, n_states_samples_remove{}, corr_len{},
64
+ noise_size{}, noise_repeats{},
65
+ last_nodes{0}, last_time_steps{0}, last_rand_seed{0},
66
+ last_noise_time_steps{0};
67
+ // TODO: make some short or size_t
68
+ bool cpu_initialized{false}, modifies_params{false}, do_delay{};
69
+
70
+ #ifdef _GPU_ENABLED
71
+ virtual void free_gpu();
72
+ bool gpu_initialized{false};
73
+ #endif
74
+
75
+ u_real ***states_out;
76
+ u_real *noise;
77
+ int **global_out_int;
78
+ bool **global_out_bool;
79
+ int *window_starts, *window_ends;
80
+ #ifdef NOISE_SEGMENT
81
+ int *shuffled_nodes, *shuffled_ts;
82
+ #endif
83
+ #ifdef _GPU_ENABLED
84
+ u_real **BOLD, **mean_bold, **ssd_bold, **fc_trils, **windows_mean_bold, **windows_ssd_bold,
85
+ **windows_fc_trils, **windows_mean_fc, **windows_ssd_fc, **fcd_trils,
86
+ **d_SC, **d_global_params, **d_regional_params;
87
+ double **d_fc_trils, **d_fcd_trils;
88
+ int *pairs_i, *pairs_j, *window_pairs_i, *window_pairs_j, *d_SC_indices;
89
+ #endif
90
+
91
+ struct Config {
92
+ int bold_remove_s{30};
93
+ bool exc_interhemispheric{true};
94
+ bool drop_edges{true};
95
+ bool sync_msec{false};
96
+ bool ext_out{true};
97
+ bool states_ts{false};
98
+ // set a default length of noise segment (msec)
99
+ int noise_time_steps{30000};
100
+ bool verbose{false}; // print simulation info + progress
101
+ int progress_interval{500}; // msec; interval for updating progress
102
+ bool serial{false};
103
+ };
104
+
105
+ Config base_conf;
106
+
107
+ void print_config() {
108
+ std::cout << "nodes: " << nodes << std::endl;
109
+ std::cout << "N_SIMS: " << N_SIMS << std::endl;
110
+ std::cout << "N_SCs: " << N_SCs << std::endl;
111
+ std::cout << "BOLD_TR: " << BOLD_TR << std::endl;
112
+ std::cout << "states_sampling: " << states_sampling << std::endl;
113
+ std::cout << "time_steps: " << time_steps << std::endl;
114
+ std::cout << "do_delay: " << do_delay << std::endl;
115
+ std::cout << "window_size: " << window_size << std::endl;
116
+ std::cout << "window_step: " << window_step << std::endl;
117
+ std::cout << "rand_seed: " << rand_seed << std::endl;
118
+ std::cout << "exc_interhemispheric: " << base_conf.exc_interhemispheric << std::endl;
119
+ std::cout << "sync_msec: " << base_conf.sync_msec << std::endl;
120
+ std::cout << "verbose: " << base_conf.verbose << std::endl;
121
+ std::cout << "progress_interval: " << base_conf.progress_interval << std::endl;
122
+ std::cout << "bold_remove_s: " << base_conf.bold_remove_s << std::endl;
123
+ std::cout << "drop_edges: " << base_conf.drop_edges << std::endl;
124
+ std::cout << "noise_time_steps: " << base_conf.noise_time_steps << std::endl;
125
+ }
126
+
127
+ virtual void set_conf(std::map<std::string, std::string> config_map) {
128
+ set_base_conf(config_map);
129
+ }
130
+ #ifdef _GPU_ENABLED
131
+ virtual void init_gpu(BWConstants bwc) = 0;
132
+ virtual void run_simulations_gpu(
133
+ double * BOLD_ex_out, double * fc_trils_out, double * fcd_trils_out,
134
+ u_real ** global_params, u_real ** regional_params, u_real * v_list,
135
+ u_real ** SC, int * SC_indices, u_real * SC_dist) = 0;
136
+ #endif
137
+ virtual void init_cpu() = 0;
138
+ virtual void run_simulations_cpu(
139
+ double * BOLD_ex_out, double * fc_trils_out, double * fcd_trils_out,
140
+ u_real ** global_params, u_real ** regional_params, u_real * v_list,
141
+ u_real ** SC, int * SC_indices, u_real * SC_dist) = 0;
142
+ virtual void prep_params(u_real ** global_params, u_real ** regional_params, u_real * v_list,
143
+ u_real ** SC, int * SC_indices, u_real * SC_dist,
144
+ bool ** global_out_bool, int ** global_out_int) {};
145
+ // use if additional modification of parameters is needed (e.g. FIC in rWW)
146
+ // declare getters for some of static variables
147
+ // note that as these variables must be static
148
+ // and known at compile time, we cannot define
149
+ // the implementation in the base class
150
+ // the only solution I could think of was to
151
+ // define the (same) implementation in all
152
+ // derived models to make sure they return
153
+ // the static member of that particular model
154
+ // TODO: see if there is a better solution
155
+ virtual int get_n_state_vars() = 0;
156
+ virtual int get_n_global_out_bool() = 0;
157
+ virtual int get_n_global_out_int() = 0;
158
+ virtual int get_n_global_params() = 0;
159
+ virtual int get_n_regional_params() = 0;
160
+ virtual char * get_name() {
161
+ return name;
162
+ }
163
+
164
+ virtual void h_init(
165
+ u_real* _state_vars, u_real* _intermediate_vars,
166
+ u_real* _global_params, u_real* _regional_params,
167
+ int* _ext_int, bool* _ext_bool,
168
+ int* _ext_int_shared, bool* _ext_bool_shared
169
+ ) = 0;
170
+ virtual void h_step(
171
+ u_real* _state_vars, u_real* _intermediate_vars,
172
+ u_real* _global_params, u_real* _regional_params,
173
+ u_real& tmp_globalinput,
174
+ u_real* noise, long& noise_idx
175
+ ) = 0;
176
+ virtual void _j_post_bw_step(
177
+ u_real* _state_vars, u_real* _intermediate_vars,
178
+ int* _ext_int, bool* _ext_bool,
179
+ int* _ext_int_shared, bool* _ext_bool_shared,
180
+ bool& restart,
181
+ u_real* _global_params, u_real* _regional_params,
182
+ int& ts_bold
183
+ ) {};
184
+ virtual void h_post_bw_step(
185
+ u_real** _state_vars, u_real** _intermediate_vars,
186
+ int** _ext_int, bool** _ext_bool,
187
+ int* _ext_int_shared, bool* _ext_bool_shared,
188
+ bool& restart,
189
+ u_real* _global_params, u_real** _regional_params,
190
+ int& ts_bold
191
+ ) {
192
+ for (int j=0; j<this->nodes; j++) {
193
+ bool j_restart = false;
194
+ _j_post_bw_step(
195
+ _state_vars[j], _intermediate_vars[j],
196
+ _ext_int[j], _ext_bool[j],
197
+ _ext_int_shared, _ext_bool_shared,
198
+ j_restart,
199
+ _global_params, _regional_params[j],
200
+ ts_bold
201
+ );
202
+ // restart if any node needs to restart
203
+ restart = restart || j_restart;
204
+ }
205
+ };
206
+ virtual void _j_restart(
207
+ u_real* _state_vars, u_real* _intermediate_vars,
208
+ u_real* _global_params, u_real* _regional_params,
209
+ int* _ext_int, bool* _ext_bool,
210
+ int* _ext_int_shared, bool* _ext_bool_shared
211
+ ) {};
212
+ virtual void h_restart(
213
+ u_real** _state_vars, u_real** _intermediate_vars,
214
+ u_real* _global_params, u_real** _regional_params,
215
+ int** _ext_int, bool** _ext_bool,
216
+ int* _ext_int_shared, bool* _ext_bool_shared
217
+ ) {
218
+ for (int j=0; j<this->nodes; j++) {
219
+ _j_restart(
220
+ _state_vars[j], _intermediate_vars[j],
221
+ _global_params, _regional_params[j],
222
+ _ext_int[j], _ext_bool[j],
223
+ _ext_int_shared, _ext_bool_shared
224
+ );
225
+ }
226
+ };
227
+ virtual void h_post_integration(
228
+ u_real ***state_vars_out,
229
+ int **global_out_int, bool **global_out_bool,
230
+ u_real* _state_vars, u_real* _intermediate_vars,
231
+ int* _ext_int, bool* _ext_bool,
232
+ int* _ext_int_shared, bool* _ext_bool_shared,
233
+ u_real** global_params, u_real** regional_params,
234
+ u_real* _global_params, u_real* _regional_params,
235
+ int& sim_idx, const int& nodes, int& j
236
+ ) {};
237
+
238
+ // In addition to the above, each derived model
239
+ // must also define the following __device__
240
+ // kernels. Note that it is not possible to declare
241
+ // them virtual, as CUDA does not work very well
242
+ // with virtual functions: `init`, `step`, `post_bw_step`,
243
+ // `restart`, `post_integration`. For their arguments see rww.hpp
244
+
245
+ virtual gsl_vector * calculate_fc_tril(gsl_matrix * bold);
246
+ virtual gsl_vector * calculate_fcd_tril(gsl_matrix * bold, int * window_starts, int * window_ends);
247
+
248
+ protected:
249
+ void set_base_conf(std::map<std::string, std::string> config_map) {
250
+ // Note: some of the base_conf members (ext_out, states_ts)
251
+ // are set directly based on arguments passed from Python
252
+ for (const auto& pair : config_map) {
253
+ if (pair.first == "exc_interhemispheric") {
254
+ this->base_conf.exc_interhemispheric = (bool)std::stoi(pair.second);
255
+ } else if (pair.first == "sync_msec") {
256
+ this->base_conf.sync_msec = (bool)std::stoi(pair.second);
257
+ } else if (pair.first == "verbose") {
258
+ this->base_conf.verbose = (bool)std::stoi(pair.second);
259
+ } else if (pair.first == "bold_remove_s") {
260
+ this->base_conf.bold_remove_s = std::stoi(pair.second);
261
+ } else if (pair.first == "drop_edges") {
262
+ this->base_conf.drop_edges = (bool)std::stoi(pair.second);
263
+ } else if (pair.first == "noise_time_steps") {
264
+ this->base_conf.noise_time_steps = std::stoi(pair.second);
265
+ } else if (pair.first == "progress_interval") {
266
+ this->base_conf.progress_interval = std::stoi(pair.second);
267
+ } else if (pair.first == "serial") {
268
+ this->base_conf.serial = (bool)std::stoi(pair.second);
269
+ }
270
+ }
271
+ }
272
+ };
273
+
274
+ // following templates will be used by each derived model
275
+ #ifdef _GPU_ENABLED
276
+ template<typename Model>
277
+ extern void _run_simulations_gpu(
278
+ double * BOLD_out, double * fc_trils_out, double * fcd_trils_out,
279
+ u_real ** global_params, u_real ** regional_params, u_real * v_list,
280
+ u_real ** SC, int * SC_indices, u_real * SC_dist, BaseModel *model
281
+ );
282
+
283
+ template<typename Model>
284
+ extern void _init_gpu(BaseModel *model, BWConstants bwc);
285
+ #endif
286
+
287
+ template <typename Model>
288
+ void _run_simulations_cpu(
289
+ double * BOLD_ex_out, double * fc_trils_out, double * fcd_trils_out,
290
+ u_real ** global_params, u_real ** regional_params, u_real * v_list,
291
+ u_real ** SC, int * SC_indices, u_real * SC_dist, BaseModel* m
292
+ );
293
+
294
+ template <typename Model>
295
+ void _init_cpu(BaseModel *m);
296
+ #endif