Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Commit

Permalink
Fix warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
olupton committed Jan 17, 2022
1 parent 5dae16a commit 3949a04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions coreneuron/gpu/nrn_acc_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ void cnrn_target_set_default_device(int device_num) {
#endif
}

#ifdef CORENEURON_ENABLE_GPU

static Memb_list* copy_ml_to_device(const Memb_list* ml, int type) {
// As we never run code for artificial cell inside GPU we don't copy it.
int is_art = corenrn.get_is_artificial()[type];
Expand Down Expand Up @@ -259,6 +261,8 @@ static void delete_ml_from_device(Memb_list* ml, int type) {
cnrn_target_delete(ml);
}

#endif

/* note: threads here are corresponding to global nrn_threads array */
void setup_nrnthreads_on_device(NrnThread* threads, int nthreads) {
#ifdef CORENEURON_ENABLE_GPU
Expand Down Expand Up @@ -891,6 +895,7 @@ void update_nrnthreads_on_host(NrnThread* threads, int nthreads) {
* from GPU to CPU.
*/
void update_weights_from_gpu(NrnThread* threads, int nthreads) {
#ifdef CORENEURON_ENABLE_GPU
for (int i = 0; i < nthreads; i++) {
NrnThread* nt = threads + i;
size_t n_weight = nt->n_weight;
Expand All @@ -900,6 +905,7 @@ void update_weights_from_gpu(NrnThread* threads, int nthreads) {
nrn_pragma_omp(target update from(weights [0:n_weight]))
}
}
#endif
}

/** Cleanup device memory that is being tracked by the OpenACC runtime.
Expand Down
2 changes: 2 additions & 0 deletions coreneuron/utils/vrecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ void VecPlayContinuous::deliver(double tt, NetCvode* ns) {
}

void VecPlayContinuous::continuous(double tt) {
#ifdef CORENEURON_ENABLE_GPU
NrnThread* nt = nrn_threads + ith_;
#endif
// clang-format off

nrn_pragma_acc(kernels present(this) if(nt->compute_gpu))
Expand Down

0 comments on commit 3949a04

Please sign in to comment.