Go to the documentation of this file.
23 using namespace nrn_partrans;
45 int n = int(ttd.outsrc_indices.size());
49 double* src_data = nt->_data;
50 int* src_indices = ttd.src_indices.data();
53 double* src_gather = ttd.src_gather.data();
54 size_t n_src_gather = ttd.src_gather.size();
57 src_data [0:nt->_ndata],
58 src_gather [0:n_src_gather])
if (nt->compute_gpu)
60 nrn_pragma_omp(target teams distribute parallel
for simd
if(nt->compute_gpu))
61 for (std::size_t
i = 0;
i < n_src_gather; ++
i) {
62 src_gather[
i] = src_data[src_indices[
i]];
70 bool compute_gpu =
false;
81 for (
size_t i = 0;
i < n_outsrc_indices; ++
i) {
82 outsrc_buf_[outsrc_indices[
i]] = src_gather[src_gather_indices[
i]];
85 static_cast<void>(compute_gpu);
98 for (
int i = 0;
i < n_insrc_buf; ++
i) {
115 double* tar_data = _nt->
_data;
117 #if defined(CORENEURON_ENABLE_GPU) && !defined(CORENEURON_PREFER_OPENMP_OFFLOAD) && \
123 present(insrc_indices [0:ntar],
128 for (
size_t i = 0;
i < ntar; ++
i) {
129 tar_data[tar_indices[
i]] =
insrc_buf_[insrc_indices[
i]];
std::vector< double > src_gather
mpi_function< cnrn_make_integral_constant_t(nrnmpi_barrier_impl)> nrnmpi_barrier
void copy_gap_indices_to_device()
nrn_pragma_acc(routine seq) nrn_pragma_omp(declare target) philox4x32_ctr_t coreneuron_random123_philox4x32_helper(coreneuron nrn_pragma_omp(end declare target) namespace coreneuron
Provide a helper function in global namespace that is declared target for OpenMP offloading to functi...
void cnrn_target_delete(std::string_view file, int line, T *h_ptr, std::size_t len=1)
std::vector< int > gather2outsrc_indices
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
std::vector< int > outsrc_indices
T * cnrn_target_copyin(std::string_view file, int line, const T *h_ptr, std::size_t len=1)
void update(NrnThread *_nt)
corenrn_parameters corenrn_param
Printing method.
mpi_function< cnrn_make_integral_constant_t(nrnmpi_dbl_alltoallv_impl)> nrnmpi_dbl_alltoallv
std::vector< int > src_indices
void nrnthread_v_transfer(NrnThread *_nt)
std::vector< int > tar_indices
std::vector< int > insrc_indices
bool mpi_enable
Initialization seed for random number generator (int)
The basic problem is to copy sources to targets.
bool nrn_have_gaps
variables defined in coreneuron library
nrn_pragma_acc(routine vector) static void triang_interleaved2(NrnThread *nt
TransferThreadData * transfer_thread_data_
void delete_gap_indices_from_device()