Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions coreneuron/gpu/nrn_acc_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ void setup_nrnthreads_on_device(NrnThread* threads, int nthreads) {
NrnThreadMembList* d_last_tml;

bool first_tml = true;
size_t offset = 6 * ne;

for (auto tml = nt->tml; tml; tml = tml->next) {
/*copy tml to device*/
Expand Down Expand Up @@ -186,13 +185,10 @@ void setup_nrnthreads_on_device(NrnThread* threads, int nthreads) {
int is_art = corenrn.get_is_artificial()[type];
int layout = corenrn.get_mech_data_layout()[type];

offset = nrn_soa_padded_size(offset, layout);

dptr = d__data + offset;

// get device pointer for corresponding mechanism data
dptr = (double*) acc_deviceptr(tml->ml->data);
acc_memcpy_to_device(&(d_ml->data), &(dptr), sizeof(double*));

offset += nrn_soa_padded_size(n, layout) * szp;

if (!is_art) {
int* d_nodeindices = (int*) acc_copyin(tml->ml->nodeindices, sizeof(int) * n);
Expand Down