@@ -37,6 +37,8 @@ of the full distribution available from
3737#define R123_USE_GNU_UINT128 1
3838#endif
3939
40+ #include " coreneuron/utils/offload.hpp"
41+
4042#include < Random123/philox.h>
4143#include < inttypes.h>
4244
@@ -46,12 +48,7 @@ of the full distribution available from
4648#define CORENRN_HOST_DEVICE
4749#endif
4850
49- // Is there actually any harm leaving the pragma in when DISABLE_OPENACC is true?
50- #if defined(_OPENACC) && !defined(DISABLE_OPENACC)
51- #define CORENRN_HOST_DEVICE_ACC CORENRN_HOST_DEVICE _Pragma (" acc routine seq" )
52- #else
53- #define CORENRN_HOST_DEVICE_ACC CORENRN_HOST_DEVICE
54- #endif
51+ #define CORENRN_HOST_DEVICE_ACC CORENRN_HOST_DEVICE nrn_pragma_acc (routine seq)
5552
5653// Some files are compiled with DISABLE_OPENACC, and some builds have no GPU
5754// support at all. In these two cases, request that the random123 state is
@@ -100,6 +97,7 @@ void nrnran123_deletestream(nrnran123_State* s,
10097 bool use_unified_memory = CORENRN_RAN123_USE_UNIFIED_MEMORY);
10198
10299/* minimal data stream */
100+ nrn_pragma_omp (declare target)
103101CORENRN_HOST_DEVICE_ACC void nrnran123_getseq (nrnran123_State*, uint32_t * seq, char * which);
104102CORENRN_HOST_DEVICE_ACC void nrnran123_getids (nrnran123_State*, uint32_t * id1, uint32_t * id2);
105103CORENRN_HOST_DEVICE_ACC void nrnran123_getids3 (nrnran123_State*,
@@ -128,6 +126,7 @@ CORENRN_HOST_DEVICE_ACC nrnran123_array4x32 nrnran123_iran(uint32_t seq,
128126 uint32_t id1,
129127 uint32_t id2);
130128CORENRN_HOST_DEVICE_ACC double nrnran123_uint2dbl (uint32_t );
129+ nrn_pragma_omp (end declare target)
131130} // namespace coreneuron
132131
133132#endif
0 commit comments