cuBNM 0.0.2__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 (357) hide show
  1. cubnm-0.0.3/PKG-INFO +118 -0
  2. cubnm-0.0.3/README.rst +62 -0
  3. cubnm-0.0.3/include/cubnm/bnm.cuh +49 -0
  4. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/bnm.hpp +9 -0
  5. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/defines.h +5 -0
  6. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/models/base.hpp +8 -3
  7. cubnm-0.0.3/include/cubnm/models/boilerplate.hpp +264 -0
  8. cubnm-0.0.3/include/cubnm/models/kuramoto.cuh +13 -0
  9. cubnm-0.0.3/include/cubnm/models/kuramoto.hpp +49 -0
  10. cubnm-0.0.3/include/cubnm/models/rww.hpp +128 -0
  11. cubnm-0.0.3/include/cubnm/models/rwwex.hpp +57 -0
  12. {cubnm-0.0.2 → cubnm-0.0.3}/pyproject.toml +19 -6
  13. {cubnm-0.0.2 → cubnm-0.0.3}/setup.py +23 -14
  14. cubnm-0.0.3/src/cubnm/__init__.py +3 -0
  15. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/_setup_opts.py +1 -1
  16. cubnm-0.0.3/src/cubnm/_version.py +21 -0
  17. cubnm-0.0.3/src/cubnm/cli.py +153 -0
  18. cubnm-0.0.3/src/cubnm/cli_parser.py +203 -0
  19. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-fcgradient01_zscore.txt +100 -0
  20. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-gabaa_zscore.txt +100 -0
  21. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-genepc1_zscore.txt +100 -0
  22. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-myelinmap_zscore.txt +100 -0
  23. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-nmda_zscore.txt +100 -0
  24. cubnm-0.0.3/src/cubnm/data/ctx_parc-schaefer-100_desc-thickness_zscore.txt +100 -0
  25. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/datasets.py +41 -23
  26. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/optimize.py +48 -18
  27. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/sim.py +253 -76
  28. cubnm-0.0.3/src/cubnm.egg-info/PKG-INFO +118 -0
  29. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm.egg-info/SOURCES.txt +15 -4
  30. cubnm-0.0.3/src/cubnm.egg-info/entry_points.txt +2 -0
  31. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm.egg-info/requires.txt +2 -1
  32. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/bnm.cpp +40 -3
  33. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/bnm.cu +69 -8
  34. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/core.cpp +82 -17
  35. cubnm-0.0.3/src/ext/models/kuramoto.cpp +44 -0
  36. cubnm-0.0.3/src/ext/models/kuramoto.cu +37 -0
  37. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/models/rww.cpp +2 -0
  38. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/models/rww.cu +2 -0
  39. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/models/rwwex.cpp +4 -2
  40. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/models/rwwex.cu +3 -1
  41. cubnm-0.0.2/PKG-INFO +0 -54
  42. cubnm-0.0.2/README.rst +0 -176
  43. cubnm-0.0.2/include/cubnm/bnm.cuh +0 -32
  44. cubnm-0.0.2/include/cubnm/models/rww.hpp +0 -259
  45. cubnm-0.0.2/include/cubnm/models/rwwex.hpp +0 -177
  46. cubnm-0.0.2/src/cubnm/__init__.py +0 -1
  47. cubnm-0.0.2/src/cubnm/data/ctx_parc-schaefer-100_desc-2maps_minmax.txt +0 -2
  48. cubnm-0.0.2/src/cubnm/data/ctx_parc-schaefer-100_desc-2maps_zscore.txt +0 -2
  49. cubnm-0.0.2/src/cubnm/data/ctx_parc-schaefer-100_desc-6maps_minmax.txt +0 -6
  50. cubnm-0.0.2/src/cubnm/data/ctx_parc-schaefer-100_desc-6maps_zscore.txt +0 -6
  51. cubnm-0.0.2/src/cubnm.egg-info/PKG-INFO +0 -54
  52. {cubnm-0.0.2 → cubnm-0.0.3}/LICENSE +0 -0
  53. {cubnm-0.0.2 → cubnm-0.0.3}/MANIFEST.in +0 -0
  54. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/fc.cuh +0 -0
  55. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/includes.cuh +0 -0
  56. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/models/base.cuh +0 -0
  57. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/models/bw.cuh +0 -0
  58. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/models/bw.hpp +0 -0
  59. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/models/rww.cuh +0 -0
  60. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/models/rww_fic.hpp +0 -0
  61. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/models/rwwex.cuh +0 -0
  62. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/utils.cuh +0 -0
  63. {cubnm-0.0.2 → cubnm-0.0.3}/include/cubnm/utils.hpp +0 -0
  64. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_blas.h +0 -0
  65. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_blas_types.h +0 -0
  66. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block.h +0 -0
  67. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_char.h +0 -0
  68. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_complex_double.h +0 -0
  69. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_complex_float.h +0 -0
  70. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_complex_long_double.h +0 -0
  71. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_double.h +0 -0
  72. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_float.h +0 -0
  73. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_int.h +0 -0
  74. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_long.h +0 -0
  75. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_long_double.h +0 -0
  76. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_short.h +0 -0
  77. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_uchar.h +0 -0
  78. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_uint.h +0 -0
  79. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_ulong.h +0 -0
  80. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_block_ushort.h +0 -0
  81. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_bspline.h +0 -0
  82. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_bst.h +0 -0
  83. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_bst_avl.h +0 -0
  84. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_bst_rb.h +0 -0
  85. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_bst_types.h +0 -0
  86. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_cblas.h +0 -0
  87. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_cdf.h +0 -0
  88. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_chebyshev.h +0 -0
  89. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_check_range.h +0 -0
  90. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_combination.h +0 -0
  91. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_complex.h +0 -0
  92. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_complex_math.h +0 -0
  93. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_const.h +0 -0
  94. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_const_cgs.h +0 -0
  95. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_const_cgsm.h +0 -0
  96. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_const_mks.h +0 -0
  97. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_const_mksa.h +0 -0
  98. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_const_num.h +0 -0
  99. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_deriv.h +0 -0
  100. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_dft_complex.h +0 -0
  101. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_dft_complex_float.h +0 -0
  102. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_dht.h +0 -0
  103. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_diff.h +0 -0
  104. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_eigen.h +0 -0
  105. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_errno.h +0 -0
  106. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_fft.h +0 -0
  107. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_fft_complex.h +0 -0
  108. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_fft_complex_float.h +0 -0
  109. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_fft_halfcomplex.h +0 -0
  110. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_fft_halfcomplex_float.h +0 -0
  111. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_fft_real.h +0 -0
  112. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_fft_real_float.h +0 -0
  113. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_filter.h +0 -0
  114. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_fit.h +0 -0
  115. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_heapsort.h +0 -0
  116. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_histogram.h +0 -0
  117. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_histogram2d.h +0 -0
  118. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_ieee_utils.h +0 -0
  119. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_inline.h +0 -0
  120. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_integration.h +0 -0
  121. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_interp.h +0 -0
  122. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_interp2d.h +0 -0
  123. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_linalg.h +0 -0
  124. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_machine.h +0 -0
  125. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_math.h +0 -0
  126. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix.h +0 -0
  127. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_char.h +0 -0
  128. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_complex_double.h +0 -0
  129. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_complex_float.h +0 -0
  130. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_complex_long_double.h +0 -0
  131. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_double.h +0 -0
  132. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_float.h +0 -0
  133. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_int.h +0 -0
  134. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_long.h +0 -0
  135. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_long_double.h +0 -0
  136. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_short.h +0 -0
  137. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_uchar.h +0 -0
  138. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_uint.h +0 -0
  139. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_ulong.h +0 -0
  140. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_matrix_ushort.h +0 -0
  141. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_message.h +0 -0
  142. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_min.h +0 -0
  143. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_minmax.h +0 -0
  144. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_mode.h +0 -0
  145. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_monte.h +0 -0
  146. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_monte_miser.h +0 -0
  147. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_monte_plain.h +0 -0
  148. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_monte_vegas.h +0 -0
  149. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_movstat.h +0 -0
  150. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_multifit.h +0 -0
  151. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_multifit_nlin.h +0 -0
  152. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_multifit_nlinear.h +0 -0
  153. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_multilarge.h +0 -0
  154. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_multilarge_nlinear.h +0 -0
  155. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_multimin.h +0 -0
  156. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_multiroots.h +0 -0
  157. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_multiset.h +0 -0
  158. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_nan.h +0 -0
  159. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_ntuple.h +0 -0
  160. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_odeiv.h +0 -0
  161. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_odeiv2.h +0 -0
  162. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permutation.h +0 -0
  163. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute.h +0 -0
  164. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_char.h +0 -0
  165. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_complex_double.h +0 -0
  166. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_complex_float.h +0 -0
  167. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_complex_long_double.h +0 -0
  168. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_double.h +0 -0
  169. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_float.h +0 -0
  170. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_int.h +0 -0
  171. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_long.h +0 -0
  172. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_long_double.h +0 -0
  173. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix.h +0 -0
  174. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_char.h +0 -0
  175. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_complex_double.h +0 -0
  176. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_complex_float.h +0 -0
  177. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_complex_long_double.h +0 -0
  178. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_double.h +0 -0
  179. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_float.h +0 -0
  180. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_int.h +0 -0
  181. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_long.h +0 -0
  182. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_long_double.h +0 -0
  183. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_short.h +0 -0
  184. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_uchar.h +0 -0
  185. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_uint.h +0 -0
  186. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_ulong.h +0 -0
  187. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_matrix_ushort.h +0 -0
  188. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_short.h +0 -0
  189. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_uchar.h +0 -0
  190. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_uint.h +0 -0
  191. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_ulong.h +0 -0
  192. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_ushort.h +0 -0
  193. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector.h +0 -0
  194. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_char.h +0 -0
  195. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_complex_double.h +0 -0
  196. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_complex_float.h +0 -0
  197. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_complex_long_double.h +0 -0
  198. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_double.h +0 -0
  199. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_float.h +0 -0
  200. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_int.h +0 -0
  201. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_long.h +0 -0
  202. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_long_double.h +0 -0
  203. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_short.h +0 -0
  204. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_uchar.h +0 -0
  205. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_uint.h +0 -0
  206. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_ulong.h +0 -0
  207. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_permute_vector_ushort.h +0 -0
  208. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_poly.h +0 -0
  209. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_pow_int.h +0 -0
  210. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_precision.h +0 -0
  211. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_qrng.h +0 -0
  212. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_randist.h +0 -0
  213. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_rng.h +0 -0
  214. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_roots.h +0 -0
  215. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_rstat.h +0 -0
  216. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf.h +0 -0
  217. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_airy.h +0 -0
  218. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_bessel.h +0 -0
  219. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_clausen.h +0 -0
  220. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_coulomb.h +0 -0
  221. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_coupling.h +0 -0
  222. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_dawson.h +0 -0
  223. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_debye.h +0 -0
  224. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_dilog.h +0 -0
  225. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_elementary.h +0 -0
  226. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_ellint.h +0 -0
  227. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_elljac.h +0 -0
  228. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_erf.h +0 -0
  229. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_exp.h +0 -0
  230. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_expint.h +0 -0
  231. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_fermi_dirac.h +0 -0
  232. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_gamma.h +0 -0
  233. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_gegenbauer.h +0 -0
  234. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_hermite.h +0 -0
  235. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_hyperg.h +0 -0
  236. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_laguerre.h +0 -0
  237. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_lambert.h +0 -0
  238. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_legendre.h +0 -0
  239. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_log.h +0 -0
  240. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_mathieu.h +0 -0
  241. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_pow_int.h +0 -0
  242. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_psi.h +0 -0
  243. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_result.h +0 -0
  244. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_sincos_pi.h +0 -0
  245. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_synchrotron.h +0 -0
  246. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_transport.h +0 -0
  247. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_trig.h +0 -0
  248. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sf_zeta.h +0 -0
  249. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_siman.h +0 -0
  250. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort.h +0 -0
  251. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_char.h +0 -0
  252. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_double.h +0 -0
  253. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_float.h +0 -0
  254. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_int.h +0 -0
  255. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_long.h +0 -0
  256. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_long_double.h +0 -0
  257. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_short.h +0 -0
  258. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_uchar.h +0 -0
  259. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_uint.h +0 -0
  260. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_ulong.h +0 -0
  261. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_ushort.h +0 -0
  262. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector.h +0 -0
  263. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_char.h +0 -0
  264. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_double.h +0 -0
  265. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_float.h +0 -0
  266. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_int.h +0 -0
  267. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_long.h +0 -0
  268. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_long_double.h +0 -0
  269. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_short.h +0 -0
  270. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_uchar.h +0 -0
  271. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_uint.h +0 -0
  272. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_ulong.h +0 -0
  273. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sort_vector_ushort.h +0 -0
  274. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spblas.h +0 -0
  275. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_specfunc.h +0 -0
  276. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_splinalg.h +0 -0
  277. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spline.h +0 -0
  278. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spline2d.h +0 -0
  279. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix.h +0 -0
  280. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_char.h +0 -0
  281. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_complex_double.h +0 -0
  282. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_complex_float.h +0 -0
  283. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_complex_long_double.h +0 -0
  284. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_double.h +0 -0
  285. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_float.h +0 -0
  286. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_int.h +0 -0
  287. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_long.h +0 -0
  288. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_long_double.h +0 -0
  289. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_short.h +0 -0
  290. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_uchar.h +0 -0
  291. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_uint.h +0 -0
  292. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_ulong.h +0 -0
  293. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_spmatrix_ushort.h +0 -0
  294. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics.h +0 -0
  295. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_char.h +0 -0
  296. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_double.h +0 -0
  297. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_float.h +0 -0
  298. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_int.h +0 -0
  299. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_long.h +0 -0
  300. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_long_double.h +0 -0
  301. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_short.h +0 -0
  302. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_uchar.h +0 -0
  303. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_uint.h +0 -0
  304. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_ulong.h +0 -0
  305. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_statistics_ushort.h +0 -0
  306. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sum.h +0 -0
  307. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_sys.h +0 -0
  308. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_test.h +0 -0
  309. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_types.h +0 -0
  310. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector.h +0 -0
  311. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_char.h +0 -0
  312. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_complex.h +0 -0
  313. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_complex_double.h +0 -0
  314. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_complex_float.h +0 -0
  315. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_complex_long_double.h +0 -0
  316. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_double.h +0 -0
  317. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_float.h +0 -0
  318. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_int.h +0 -0
  319. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_long.h +0 -0
  320. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_long_double.h +0 -0
  321. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_short.h +0 -0
  322. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_uchar.h +0 -0
  323. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_uint.h +0 -0
  324. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_ulong.h +0 -0
  325. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_vector_ushort.h +0 -0
  326. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_version.h +0 -0
  327. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_wavelet.h +0 -0
  328. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/gsl_wavelet2d.h +0 -0
  329. {cubnm-0.0.2 → cubnm-0.0.3}/include/gsl/test_source.c +0 -0
  330. {cubnm-0.0.2 → cubnm-0.0.3}/setup.cfg +0 -0
  331. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/_core.py +0 -0
  332. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-aparc_approach-median_mean001_desc-length.txt +0 -0
  333. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-aparc_approach-median_mean001_desc-strength.txt +0 -0
  334. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-100_approach-median_mean001_desc-length.txt +0 -0
  335. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-100_approach-median_mean001_desc-strength.txt +0 -0
  336. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-100_desc-yeo7.txt +0 -0
  337. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-100_hemi-LR_desc-FCDtril.txt +0 -0
  338. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-100_hemi-LR_desc-FCtril.txt +0 -0
  339. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-100_hemi-LR_exc-inter_desc-FCDtril.txt +0 -0
  340. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-100_hemi-LR_exc-inter_desc-FCtril.txt +0 -0
  341. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-200_approach-median_mean001_desc-length.txt +0 -0
  342. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-200_approach-median_mean001_desc-strength.txt +0 -0
  343. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-400_approach-median_mean001_desc-length.txt +0 -0
  344. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-400_approach-median_mean001_desc-strength.txt +0 -0
  345. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-600_approach-median_mean001_desc-length.txt +0 -0
  346. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/data/ctx_parc-schaefer-600_approach-median_mean001_desc-strength.txt +0 -0
  347. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm/utils.py +0 -0
  348. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm.egg-info/dependency_links.txt +0 -0
  349. {cubnm-0.0.2 → cubnm-0.0.3}/src/cubnm.egg-info/top_level.txt +0 -0
  350. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/fc.cpp +0 -0
  351. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/fc.cu +0 -0
  352. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/models/base.cpp +0 -0
  353. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/models/bw.cpp +0 -0
  354. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/models/bw.cu +0 -0
  355. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/models/rww_fic.cpp +0 -0
  356. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/utils.cpp +0 -0
  357. {cubnm-0.0.2 → cubnm-0.0.3}/src/ext/utils.cu +0 -0
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
@@ -9,4 +9,13 @@ void _run_simulations_cpu(
9
9
 
10
10
  template <typename Model>
11
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
+
12
21
  #endif
@@ -6,6 +6,8 @@
6
6
  #define EXP expf
7
7
  #define POW powf
8
8
  #define SQRT sqrtf
9
+ #define SIN sinf
10
+ #define FMOD fmodf
9
11
  #define CUDA_MAX fmaxf
10
12
  #define CUDA_MIN fminf
11
13
  #else
@@ -13,9 +15,12 @@
13
15
  #define EXP exp
14
16
  #define POW pow
15
17
  #define SQRT sqrt
18
+ #define SIN sin
19
+ #define FMOD fmod
16
20
  #define CUDA_MAX max
17
21
  #define CUDA_MIN min
18
22
  #endif
23
+ #define PI 3.14159265358979323846
19
24
 
20
25
  #ifndef MAX_NODES_REG
21
26
  #define MAX_NODES_REG 200
@@ -1,6 +1,7 @@
1
1
  #ifndef BASE_HPP
2
2
  #define BASE_HPP
3
3
  #include "cubnm/models/bw.hpp" // will be used by all derived models
4
+ #include "cubnm/models/boilerplate.hpp"
4
5
 
5
6
  class BaseModel {
6
7
  public:
@@ -161,7 +162,8 @@ public:
161
162
  }
162
163
 
163
164
  virtual void h_init(
164
- u_real* _state_vars, u_real* _intermediate_vars,
165
+ u_real* _state_vars, u_real* _intermediate_vars,
166
+ u_real* _global_params, u_real* _regional_params,
165
167
  int* _ext_int, bool* _ext_bool,
166
168
  int* _ext_int_shared, bool* _ext_bool_shared
167
169
  ) = 0;
@@ -202,18 +204,21 @@ public:
202
204
  }
203
205
  };
204
206
  virtual void _j_restart(
205
- u_real* _state_vars, u_real* _intermediate_vars,
207
+ u_real* _state_vars, u_real* _intermediate_vars,
208
+ u_real* _global_params, u_real* _regional_params,
206
209
  int* _ext_int, bool* _ext_bool,
207
210
  int* _ext_int_shared, bool* _ext_bool_shared
208
211
  ) {};
209
212
  virtual void h_restart(
210
213
  u_real** _state_vars, u_real** _intermediate_vars,
214
+ u_real* _global_params, u_real** _regional_params,
211
215
  int** _ext_int, bool** _ext_bool,
212
216
  int* _ext_int_shared, bool* _ext_bool_shared
213
217
  ) {
214
218
  for (int j=0; j<this->nodes; j++) {
215
219
  _j_restart(
216
- _state_vars[j], _intermediate_vars[j],
220
+ _state_vars[j], _intermediate_vars[j],
221
+ _global_params, _regional_params[j],
217
222
  _ext_int[j], _ext_bool[j],
218
223
  _ext_int_shared, _ext_bool_shared
219
224
  );
@@ -0,0 +1,264 @@
1
+ /*
2
+ This macro can be used to create the definition/declarations of a derived
3
+ model. Using a boilerplate macro is the simplest solution (that I currently
4
+ know of) to the issue that CUDA kernels cannot be virtual
5
+ + some other functions e.g. free_cpu, free_gpu, etc. must
6
+ be redefined so that they operate on derived member variables.
7
+ Overall, the goal of using this boilerplat is to make addition of new
8
+ models easier and avoid code repetition to some extent.
9
+
10
+ Note: There are two macros defined with and without GPU
11
+ support and most of the code is repeated in the two, therefore
12
+ any changes must be made in both macros.
13
+
14
+ Usage:
15
+
16
+ // include/cubnm/models/derived_model.hpp
17
+
18
+ class derivedModel : public BaseModel {
19
+ struct Constants {}; // this is required even if empty
20
+ struct Config {}; // this is required even if empty
21
+
22
+ DEFINE_DERIVED_MODEL(<args>) // see below the arguments
23
+
24
+ // declare cpu functions that need to be overridden
25
+ // (in addition to h_init, h_step, _j_restart
26
+ // which are always overriden and have to be defined)
27
+ ...
28
+ }
29
+
30
+ The imlpementation of device kernels must be in `src/ext/models/derived_model.cu`
31
+ and the implementation of CPU funcitons must be in `src/ext/models/derived_model.cpp`.
32
+ The latter must also include a decalartion of a Constants instance (which is static)
33
+ and the implementation of init_constants which will define the values of constants.
34
+
35
+ In addition for GPU usage the following must be defined in
36
+ `include/cubnm/models/derived_model.cuh`:
37
+
38
+ #include "derived_model.hpp"
39
+ __constant__ derivedModel::Constants d_derivedc;
40
+ template void _run_simulations_gpu<derivedModel>(
41
+ double*, double*, double*,
42
+ u_real**, u_real**, u_real*,
43
+ u_real**, int*, u_real*,
44
+ BaseModel*
45
+ );
46
+
47
+ template void _init_gpu<derivedModel>(BaseModel*, BWConstants);
48
+
49
+ Lastly on Python side in `src/cubnm/sim.py` a class of `derivedSimGroup`
50
+ must be defined.
51
+
52
+ See rWWEx model as a simple example, and rWW as a more complex one.
53
+ */
54
+
55
+ #ifdef _GPU_ENABLED
56
+ #define DEFINE_DERIVED_MODEL(CLASS_NAME, NAME, STATE_VARS, INTER_VARS, NOISE, \
57
+ GLOBAL_PARAMS, REGIONAL_PARAMS, CONN_STATE_VAR_IDX, \
58
+ BOLD_STATE_VAR_IDX, HAS_POST_BW, HAS_POST_INT, IS_OSC, \
59
+ EXT_INT, EXT_BOOL, EXT_INT_SHARED, EXT_BOOL_SHARED, \
60
+ GLOBAL_OUT_INT, GLOBAL_OUT_BOOL, GLOBAL_OUT_UREAL, \
61
+ REGIONAL_OUT_INT, REGIONAL_OUT_BOOL, REGIONAL_OUT_UREAL) \
62
+ using BaseModel::BaseModel; \
63
+ ~CLASS_NAME() { \
64
+ if (cpu_initialized) { \
65
+ this->free_cpu(); \
66
+ } \
67
+ if (gpu_initialized) { \
68
+ this->free_gpu(); \
69
+ } \
70
+ } \
71
+ static constexpr char* name = NAME; \
72
+ static constexpr int n_state_vars = STATE_VARS; \
73
+ static constexpr int n_intermediate_vars = INTER_VARS; \
74
+ static constexpr int n_noise = NOISE; \
75
+ static constexpr int n_global_params = GLOBAL_PARAMS; \
76
+ static constexpr int n_regional_params = REGIONAL_PARAMS; \
77
+ static constexpr int conn_state_var_idx = CONN_STATE_VAR_IDX; \
78
+ static constexpr int bold_state_var_idx = BOLD_STATE_VAR_IDX; \
79
+ static constexpr int n_ext_int = EXT_INT; \
80
+ static constexpr int n_ext_bool = EXT_BOOL; \
81
+ static constexpr int n_ext_int_shared = EXT_INT_SHARED; \
82
+ static constexpr int n_ext_bool_shared = EXT_BOOL_SHARED; \
83
+ static constexpr int n_global_out_int = GLOBAL_OUT_INT; \
84
+ static constexpr int n_global_out_bool = GLOBAL_OUT_BOOL; \
85
+ static constexpr int n_global_out_u_real = GLOBAL_OUT_UREAL; \
86
+ static constexpr int n_regional_out_int = REGIONAL_OUT_INT; \
87
+ static constexpr int n_regional_out_bool = REGIONAL_OUT_BOOL; \
88
+ static constexpr int n_regional_out_u_real = REGIONAL_OUT_UREAL; \
89
+ static constexpr bool has_post_bw_step = HAS_POST_BW; \
90
+ static constexpr bool has_post_integration = HAS_POST_INT; \
91
+ static constexpr bool is_osc = IS_OSC; \
92
+ static Constants mc; \
93
+ Config conf; \
94
+ static void init_constants(); \
95
+ CUDA_CALLABLE_MEMBER void init( \
96
+ u_real* _state_vars, u_real* _intermediate_vars, \
97
+ u_real* _global_params, u_real* _regional_params, \
98
+ int* _ext_int, bool* _ext_bool, \
99
+ int* _ext_int_shared, bool* _ext_bool_shared); \
100
+ CUDA_CALLABLE_MEMBER void step( \
101
+ u_real* _state_vars, u_real* _intermediate_vars, \
102
+ u_real* _global_params, u_real* _regional_params, \
103
+ u_real& tmp_globalinput, \
104
+ u_real* noise, long& noise_idx); \
105
+ CUDA_CALLABLE_MEMBER void post_bw_step( \
106
+ u_real* _state_vars, u_real* _intermediate_vars, \
107
+ int* _ext_int, bool* _ext_bool, \
108
+ int* _ext_int_shared, bool* _ext_bool_shared, \
109
+ bool& restart, \
110
+ u_real* _global_params, u_real* _regional_params, \
111
+ int& ts_bold); \
112
+ CUDA_CALLABLE_MEMBER void restart( \
113
+ u_real* _state_vars, u_real* _intermediate_vars, \
114
+ u_real* _global_params, u_real* _regional_params, \
115
+ int* _ext_int, bool* _ext_bool, \
116
+ int* _ext_int_shared, bool* _ext_bool_shared); \
117
+ CUDA_CALLABLE_MEMBER void post_integration( \
118
+ u_real ***state_vars_out, \
119
+ int **global_out_int, bool **global_out_bool, \
120
+ u_real* _state_vars, u_real* _intermediate_vars, \
121
+ int* _ext_int, bool* _ext_bool, \
122
+ int* _ext_int_shared, bool* _ext_bool_shared, \
123
+ u_real** global_params, u_real** regional_params, \
124
+ u_real* _global_params, u_real* _regional_params, \
125
+ int& sim_idx, const int& nodes, int& j); \
126
+ void init_gpu(BWConstants bwc) override final { \
127
+ _init_gpu<CLASS_NAME>(this, bwc); \
128
+ } \
129
+ void run_simulations_gpu( \
130
+ double * BOLD_ex_out, double * fc_trils_out, double * fcd_trils_out, \
131
+ u_real ** global_params, u_real ** regional_params, u_real * v_list, \
132
+ u_real ** SC, int * SC_indices, u_real * SC_dist) override final { \
133
+ _run_simulations_gpu<CLASS_NAME>( \
134
+ BOLD_ex_out, fc_trils_out, fcd_trils_out, \
135
+ global_params, regional_params, v_list, \
136
+ SC, SC_indices, SC_dist, this); \
137
+ } \
138
+ void h_init( \
139
+ u_real* _state_vars, u_real* _intermediate_vars, \
140
+ u_real* _global_params, u_real* _regional_params, \
141
+ int* _ext_int, bool* _ext_bool, \
142
+ int* _ext_int_shared, bool* _ext_bool_shared) override final; \
143
+ void h_step( \
144
+ u_real* _state_vars, u_real* _intermediate_vars, \
145
+ u_real* _global_params, u_real* _regional_params, \
146
+ u_real& tmp_globalinput, \
147
+ u_real* noise, long& noise_idx) override final; \
148
+ void _j_restart( \
149
+ u_real* _state_vars, u_real* _intermediate_vars, \
150
+ u_real* _global_params, u_real* _regional_params, \
151
+ int* _ext_int, bool* _ext_bool, \
152
+ int* _ext_int_shared, bool* _ext_bool_shared) override final; \
153
+ void init_cpu() override final { \
154
+ _init_cpu<CLASS_NAME>(this); \
155
+ } \
156
+ void run_simulations_cpu( \
157
+ double * BOLD_ex_out, double * fc_trils_out, double * fcd_trils_out, \
158
+ u_real ** global_params, u_real ** regional_params, u_real * v_list, \
159
+ u_real ** SC, int * SC_indices, u_real * SC_dist) override final { \
160
+ _run_simulations_cpu<CLASS_NAME>( \
161
+ BOLD_ex_out, fc_trils_out, fcd_trils_out, \
162
+ global_params, regional_params, v_list, \
163
+ SC, SC_indices, SC_dist, this); \
164
+ } \
165
+ int get_n_state_vars() override final { \
166
+ return n_state_vars; \
167
+ } \
168
+ int get_n_global_out_bool() override final { \
169
+ return n_global_out_bool; \
170
+ } \
171
+ int get_n_global_out_int() override final { \
172
+ return n_global_out_int; \
173
+ } \
174
+ int get_n_global_params() override final { \
175
+ return n_global_params; \
176
+ } \
177
+ int get_n_regional_params() override final { \
178
+ return n_regional_params; \
179
+ } \
180
+ char * get_name() override final { \
181
+ return name; \
182
+ }
183
+ #else
184
+ #define DEFINE_DERIVED_MODEL(CLASS_NAME, NAME, STATE_VARS, INTER_VARS, NOISE, \
185
+ GLOBAL_PARAMS, REGIONAL_PARAMS, CONN_STATE_VAR_IDX, \
186
+ BOLD_STATE_VAR_IDX, HAS_POST_BW, HAS_POST_INT, \
187
+ EXT_INT, EXT_BOOL, EXT_INT_SHARED, EXT_BOOL_SHARED, \
188
+ GLOBAL_OUT_INT, GLOBAL_OUT_BOOL, GLOBAL_OUT_UREAL, \
189
+ REGIONAL_OUT_INT, REGIONAL_OUT_BOOL, REGIONAL_OUT_UREAL) \
190
+ using BaseModel::BaseModel; \
191
+ ~CLASS_NAME() { \
192
+ if (cpu_initialized) { \
193
+ this->free_cpu(); \
194
+ } \
195
+ } \
196
+ static constexpr char* name = NAME; \
197
+ static constexpr int n_state_vars = STATE_VARS; \
198
+ static constexpr int n_intermediate_vars = INTER_VARS; \
199
+ static constexpr int n_noise = NOISE; \
200
+ static constexpr int n_global_params = GLOBAL_PARAMS; \
201
+ static constexpr int n_regional_params = REGIONAL_PARAMS; \
202
+ static constexpr int conn_state_var_idx = CONN_STATE_VAR_IDX; \
203
+ static constexpr int bold_state_var_idx = BOLD_STATE_VAR_IDX; \
204
+ static constexpr int n_ext_int = EXT_INT; \
205
+ static constexpr int n_ext_bool = EXT_BOOL; \
206
+ static constexpr int n_ext_int_shared = EXT_INT_SHARED; \
207
+ static constexpr int n_ext_bool_shared = EXT_BOOL_SHARED; \
208
+ static constexpr int n_global_out_int = GLOBAL_OUT_INT; \
209
+ static constexpr int n_global_out_bool = GLOBAL_OUT_BOOL; \
210
+ static constexpr int n_global_out_u_real = GLOBAL_OUT_UREAL; \
211
+ static constexpr int n_regional_out_int = REGIONAL_OUT_INT; \
212
+ static constexpr int n_regional_out_bool = REGIONAL_OUT_BOOL; \
213
+ static constexpr int n_regional_out_u_real = REGIONAL_OUT_UREAL; \
214
+ static constexpr bool has_post_bw_step = HAS_POST_BW; \
215
+ static constexpr bool has_post_integration = HAS_POST_INT; \
216
+ static Constants mc; \
217
+ Config conf; \
218
+ static void init_constants(); \
219
+ void h_init( \
220
+ u_real* _state_vars, u_real* _intermediate_vars, \
221
+ u_real* _global_params, u_real* _regional_params, \
222
+ int* _ext_int, bool* _ext_bool, \
223
+ int* _ext_int_shared, bool* _ext_bool_shared) override final; \
224
+ void h_step( \
225
+ u_real* _state_vars, u_real* _intermediate_vars, \
226
+ u_real* _global_params, u_real* _regional_params, \
227
+ u_real& tmp_globalinput, \
228
+ u_real* noise, long& noise_idx) override final; \
229
+ void _j_restart( \
230
+ u_real* _state_vars, u_real* _intermediate_vars, \
231
+ u_real* _global_params, u_real* _regional_params, \
232
+ int* _ext_int, bool* _ext_bool, \
233
+ int* _ext_int_shared, bool* _ext_bool_shared) override final; \
234
+ void init_cpu() override final { \
235
+ _init_cpu<CLASS_NAME>(this); \
236
+ } \
237
+ void run_simulations_cpu( \
238
+ double * BOLD_ex_out, double * fc_trils_out, double * fcd_trils_out, \
239
+ u_real ** global_params, u_real ** regional_params, u_real * v_list, \
240
+ u_real ** SC, int * SC_indices, u_real * SC_dist) override final { \
241
+ _run_simulations_cpu<CLASS_NAME>( \
242
+ BOLD_ex_out, fc_trils_out, fcd_trils_out, \
243
+ global_params, regional_params, v_list, \
244
+ SC, SC_indices, SC_dist, this); \
245
+ } \
246
+ int get_n_state_vars() override final { \
247
+ return n_state_vars; \
248
+ } \
249
+ int get_n_global_out_bool() override final { \
250
+ return n_global_out_bool; \
251
+ } \
252
+ int get_n_global_out_int() override final { \
253
+ return n_global_out_int; \
254
+ } \
255
+ int get_n_global_params() override final { \
256
+ return n_global_params; \
257
+ } \
258
+ int get_n_regional_params() override final { \
259
+ return n_regional_params; \
260
+ } \
261
+ char * get_name() override final { \
262
+ return name; \
263
+ }
264
+ #endif
@@ -0,0 +1,13 @@
1
+ #ifndef KURAMOTO_CUH
2
+ #define KURAMOTO_CUH
3
+ #include "kuramoto.hpp"
4
+ __constant__ KuramotoModel::Constants d_Kuramotoc;
5
+ template void _run_simulations_gpu<KuramotoModel>(
6
+ double*, double*, double*,
7
+ u_real**, u_real**, u_real*,
8
+ u_real**, int*, u_real*,
9
+ BaseModel*
10
+ );
11
+
12
+ template void _init_gpu<KuramotoModel>(BaseModel*, BWConstants);
13
+ #endif
@@ -0,0 +1,49 @@
1
+ #ifndef KURAMOTO_HPP
2
+ #define KURAMOTO_HPP
3
+ #include "cubnm/models/base.hpp"
4
+ class KuramotoModel : public BaseModel {
5
+ public:
6
+ // first define Constants and Config structs
7
+ // they always must be defined even if empty
8
+ struct Constants {
9
+ u_real dt;
10
+ u_real sqrt_dt;
11
+ u_real twopi;
12
+ };
13
+ struct Config {
14
+ };
15
+
16
+ // second, use the boilerplate macro to include
17
+ // the repetitive elements of the class definition
18
+ DEFINE_DERIVED_MODEL(
19
+ KuramotoModel,
20
+ "Kuramoto",
21
+ 1,
22
+ 1,
23
+ 1,
24
+ 1,
25
+ 3,
26
+ 0,
27
+ 0,
28
+ false,
29
+ false,
30
+ true,
31
+ 0,
32
+ 0,
33
+ 0,
34
+ 0,
35
+ 0,
36
+ 0,
37
+ 0,
38
+ 0,
39
+ 0,
40
+ 0
41
+ )
42
+
43
+ // additional functions that need to be overridden
44
+ // (in addition to h_init, h_step, _j_restart
45
+ // which are always overriden and have to be defined)
46
+ // None in this model
47
+ };
48
+
49
+ #endif