cuBNM 0.0.2__tar.gz → 0.0.4__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.
- cubnm-0.0.4/PKG-INFO +118 -0
- cubnm-0.0.4/README.rst +62 -0
- cubnm-0.0.4/include/cubnm/bnm.cuh +49 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/bnm.hpp +10 -1
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/defines.h +6 -1
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/models/base.hpp +12 -7
- cubnm-0.0.4/include/cubnm/models/boilerplate.hpp +264 -0
- cubnm-0.0.4/include/cubnm/models/kuramoto.cuh +13 -0
- cubnm-0.0.4/include/cubnm/models/kuramoto.hpp +49 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/models/rww.cuh +1 -1
- cubnm-0.0.4/include/cubnm/models/rww.hpp +128 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/models/rwwex.cuh +1 -1
- cubnm-0.0.4/include/cubnm/models/rwwex.hpp +57 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/pyproject.toml +19 -6
- {cubnm-0.0.2 → cubnm-0.0.4}/setup.py +25 -16
- cubnm-0.0.4/src/cubnm/__init__.py +3 -0
- cubnm-0.0.4/src/cubnm/_setup_opts.py +6 -0
- cubnm-0.0.4/src/cubnm/_version.py +21 -0
- cubnm-0.0.4/src/cubnm/cli.py +152 -0
- cubnm-0.0.4/src/cubnm/cli_parser.py +188 -0
- cubnm-0.0.4/src/cubnm/data/ctx_parc-schaefer-100_desc-fcgradient01_zscore.txt +100 -0
- cubnm-0.0.4/src/cubnm/data/ctx_parc-schaefer-100_desc-gabaa_zscore.txt +100 -0
- cubnm-0.0.4/src/cubnm/data/ctx_parc-schaefer-100_desc-genepc1_zscore.txt +100 -0
- cubnm-0.0.4/src/cubnm/data/ctx_parc-schaefer-100_desc-myelinmap_zscore.txt +100 -0
- cubnm-0.0.4/src/cubnm/data/ctx_parc-schaefer-100_desc-nmda_zscore.txt +100 -0
- cubnm-0.0.4/src/cubnm/data/ctx_parc-schaefer-100_desc-thickness_zscore.txt +100 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/datasets.py +41 -23
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/optimize.py +48 -18
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/sim.py +382 -99
- cubnm-0.0.4/src/cubnm.egg-info/PKG-INFO +118 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm.egg-info/SOURCES.txt +15 -4
- cubnm-0.0.4/src/cubnm.egg-info/entry_points.txt +2 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm.egg-info/requires.txt +2 -1
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/bnm.cpp +47 -8
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/bnm.cu +89 -40
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/core.cpp +123 -32
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/models/base.cpp +1 -1
- cubnm-0.0.4/src/ext/models/kuramoto.cpp +44 -0
- cubnm-0.0.4/src/ext/models/kuramoto.cu +37 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/models/rww.cpp +7 -3
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/models/rww.cu +2 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/models/rwwex.cpp +4 -2
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/models/rwwex.cu +3 -1
- cubnm-0.0.2/PKG-INFO +0 -54
- cubnm-0.0.2/README.rst +0 -176
- cubnm-0.0.2/include/cubnm/bnm.cuh +0 -32
- cubnm-0.0.2/include/cubnm/models/rww.hpp +0 -259
- cubnm-0.0.2/include/cubnm/models/rwwex.hpp +0 -177
- cubnm-0.0.2/src/cubnm/__init__.py +0 -1
- cubnm-0.0.2/src/cubnm/_setup_opts.py +0 -6
- cubnm-0.0.2/src/cubnm/data/ctx_parc-schaefer-100_desc-2maps_minmax.txt +0 -2
- cubnm-0.0.2/src/cubnm/data/ctx_parc-schaefer-100_desc-2maps_zscore.txt +0 -2
- cubnm-0.0.2/src/cubnm/data/ctx_parc-schaefer-100_desc-6maps_minmax.txt +0 -6
- cubnm-0.0.2/src/cubnm/data/ctx_parc-schaefer-100_desc-6maps_zscore.txt +0 -6
- cubnm-0.0.2/src/cubnm.egg-info/PKG-INFO +0 -54
- {cubnm-0.0.2 → cubnm-0.0.4}/LICENSE +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/MANIFEST.in +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/fc.cuh +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/includes.cuh +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/models/base.cuh +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/models/bw.cuh +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/models/bw.hpp +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/models/rww_fic.hpp +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/utils.cuh +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/cubnm/utils.hpp +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_blas.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_blas_types.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_complex_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_complex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_complex_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_block_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_bspline.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_bst.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_bst_avl.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_bst_rb.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_bst_types.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_cblas.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_cdf.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_chebyshev.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_check_range.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_combination.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_complex.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_complex_math.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_const.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_const_cgs.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_const_cgsm.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_const_mks.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_const_mksa.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_const_num.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_deriv.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_dft_complex.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_dft_complex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_dht.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_diff.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_eigen.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_errno.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_fft.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_fft_complex.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_fft_complex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_fft_halfcomplex.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_fft_halfcomplex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_fft_real.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_fft_real_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_filter.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_fit.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_heapsort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_histogram.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_histogram2d.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_ieee_utils.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_inline.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_integration.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_interp.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_interp2d.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_linalg.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_machine.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_math.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_complex_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_complex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_complex_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_matrix_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_message.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_min.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_minmax.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_mode.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_monte.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_monte_miser.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_monte_plain.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_monte_vegas.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_movstat.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_multifit.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_multifit_nlin.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_multifit_nlinear.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_multilarge.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_multilarge_nlinear.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_multimin.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_multiroots.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_multiset.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_nan.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_ntuple.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_odeiv.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_odeiv2.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permutation.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_complex_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_complex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_complex_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_complex_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_complex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_complex_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_matrix_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_complex_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_complex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_complex_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_permute_vector_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_poly.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_pow_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_precision.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_qrng.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_randist.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_rng.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_roots.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_rstat.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_airy.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_bessel.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_clausen.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_coulomb.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_coupling.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_dawson.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_debye.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_dilog.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_elementary.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_ellint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_elljac.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_erf.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_exp.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_expint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_fermi_dirac.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_gamma.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_gegenbauer.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_hermite.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_hyperg.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_laguerre.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_lambert.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_legendre.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_log.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_mathieu.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_pow_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_psi.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_result.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_sincos_pi.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_synchrotron.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_transport.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_trig.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sf_zeta.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_siman.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sort_vector_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spblas.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_specfunc.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_splinalg.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spline.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spline2d.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_complex_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_complex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_complex_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_spmatrix_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_statistics_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sum.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_sys.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_test.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_types.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_char.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_complex.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_complex_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_complex_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_complex_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_float.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_int.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_long.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_long_double.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_short.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_uchar.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_uint.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_ulong.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_vector_ushort.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_version.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_wavelet.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/gsl_wavelet2d.h +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/include/gsl/test_source.c +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/setup.cfg +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/_core.py +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-aparc_approach-median_mean001_desc-length.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-aparc_approach-median_mean001_desc-strength.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-100_approach-median_mean001_desc-length.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-100_approach-median_mean001_desc-strength.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-100_desc-yeo7.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-100_hemi-LR_desc-FCDtril.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-100_hemi-LR_desc-FCtril.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-100_hemi-LR_exc-inter_desc-FCDtril.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-100_hemi-LR_exc-inter_desc-FCtril.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-200_approach-median_mean001_desc-length.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-200_approach-median_mean001_desc-strength.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-400_approach-median_mean001_desc-length.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-400_approach-median_mean001_desc-strength.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-600_approach-median_mean001_desc-length.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/data/ctx_parc-schaefer-600_approach-median_mean001_desc-strength.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm/utils.py +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm.egg-info/dependency_links.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/cubnm.egg-info/top_level.txt +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/fc.cpp +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/fc.cu +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/models/bw.cpp +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/models/bw.cu +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/models/rww_fic.cpp +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/utils.cpp +0 -0
- {cubnm-0.0.2 → cubnm-0.0.4}/src/ext/utils.cu +0 -0
cubnm-0.0.4/PKG-INFO
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: cubnm
|
|
3
|
+
Version: 0.0.4
|
|
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
|
+
:align: center
|
|
59
|
+
:width: 350px
|
|
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.4/README.rst
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.. image:: https://raw.githubusercontent.com/amnsbr/cubnm/main/docs/_static/logo_text.png
|
|
2
|
+
:align: center
|
|
3
|
+
:width: 350px
|
|
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
|
+
const int&, 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& SC_idx,
|
|
16
|
+
const int& j, 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& SC_idx,
|
|
24
|
+
const int& j, 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
|
|
@@ -8,5 +8,14 @@ void _run_simulations_cpu(
|
|
|
8
8
|
);
|
|
9
9
|
|
|
10
10
|
template <typename Model>
|
|
11
|
-
void _init_cpu(BaseModel *m);
|
|
11
|
+
void _init_cpu(BaseModel *m, bool force_reinit);
|
|
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,15 +15,18 @@
|
|
|
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
|
|
22
27
|
#endif
|
|
23
28
|
#ifndef MAX_NODES_MANY
|
|
24
|
-
#define MAX_NODES_MANY
|
|
29
|
+
#define MAX_NODES_MANY 1024
|
|
25
30
|
#endif
|
|
26
31
|
#ifndef MANY_NODES
|
|
27
32
|
#define MAX_NODES MAX_NODES_REG
|
|
@@ -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:
|
|
@@ -127,13 +128,13 @@ public:
|
|
|
127
128
|
set_base_conf(config_map);
|
|
128
129
|
}
|
|
129
130
|
#ifdef _GPU_ENABLED
|
|
130
|
-
virtual void init_gpu(BWConstants bwc) = 0;
|
|
131
|
+
virtual void init_gpu(BWConstants bwc, bool force_reinit) = 0;
|
|
131
132
|
virtual void run_simulations_gpu(
|
|
132
133
|
double * BOLD_ex_out, double * fc_trils_out, double * fcd_trils_out,
|
|
133
134
|
u_real ** global_params, u_real ** regional_params, u_real * v_list,
|
|
134
135
|
u_real ** SC, int * SC_indices, u_real * SC_dist) = 0;
|
|
135
136
|
#endif
|
|
136
|
-
virtual void init_cpu() = 0;
|
|
137
|
+
virtual void init_cpu(bool force_reinit) = 0;
|
|
137
138
|
virtual void run_simulations_cpu(
|
|
138
139
|
double * BOLD_ex_out, double * fc_trils_out, double * fcd_trils_out,
|
|
139
140
|
u_real ** global_params, u_real ** regional_params, u_real * v_list,
|
|
@@ -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
|
);
|
|
@@ -276,7 +281,7 @@ extern void _run_simulations_gpu(
|
|
|
276
281
|
);
|
|
277
282
|
|
|
278
283
|
template<typename Model>
|
|
279
|
-
extern void _init_gpu(BaseModel *model, BWConstants bwc);
|
|
284
|
+
extern void _init_gpu(BaseModel *model, BWConstants bwc, bool force_reinit);
|
|
280
285
|
#endif
|
|
281
286
|
|
|
282
287
|
template <typename Model>
|
|
@@ -287,5 +292,5 @@ void _run_simulations_cpu(
|
|
|
287
292
|
);
|
|
288
293
|
|
|
289
294
|
template <typename Model>
|
|
290
|
-
void _init_cpu(BaseModel *m);
|
|
295
|
+
void _init_cpu(BaseModel *m, bool force_reinit);
|
|
291
296
|
#endif
|
|
@@ -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, bool force_reinit) override final { \
|
|
127
|
+
_init_gpu<CLASS_NAME>(this, bwc, force_reinit); \
|
|
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(bool force_reinit) override final { \
|
|
154
|
+
_init_cpu<CLASS_NAME>(this, force_reinit); \
|
|
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(bool force_reinit) override final { \
|
|
235
|
+
_init_cpu<CLASS_NAME>(this, force_reinit); \
|
|
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, bool);
|
|
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
|