Go to the documentation of this file.
110 template <
typename T>
113 std::copy(src, src + n, dest);
117 template <
typename T>
120 std::copy(src, src + n, dest);
123 #ifndef INTERLEAVE_DEBUG
124 #define INTERLEAVE_DEBUG 0
128 void mk_cell_indices();
int * interleave_order(int ith, int ncell, int nnode, int *parent)
Function that performs the permutation of the cells such that the execution threads access coalesced ...
int * node_order(int ncell, int nnode, int *parents, int &nwarp, int &nstride, int *&stride, int *&firstnode, int *&lastnode, int *&cellsize, int *&stridedispl)
Function that returns a permutation of length nnode.
void copy_align_array(T *&dest, T *src, size_t n)
for gpu builds with unified memory support
void swap(InterleaveInfo &info)
THIS FILE IS AUTO GENERATED DONT MODIFY IT.
icycle< ncycle;++icycle) { int istride=stride[icycle];nrn_pragma_acc(loop vector) nrn_pragma_omp(loop bind(parallel)) for(int icore=0;icore< warpsize;++icore) { int i=ii+icore;if(icore< istride) { int ip=GPU_PARENT(i);GPU_RHS(i) -=GPU_B(i) *GPU_RHS(ip);GPU_RHS(i)/=GPU_D(i);} i+=istride;} ii+=istride;}}void solve_interleaved2(int ith) { NrnThread *nt=nrn_threads+ith;InterleaveInfo &ii=interleave_info[ith];int nwarp=ii.nwarp;if(nwarp==0) return;int ncore=nwarp *warpsize;int *ncycles=ii.cellsize;int *stridedispl=ii.stridedispl;int *strides=ii.stride;int *rootbegin=ii.firstnode;int *nodebegin=ii.lastnode;nrn_pragma_acc(parallel loop gang present(nt[0:1], strides[0:nstride], ncycles[0:nwarp], stridedispl[0:nwarp+1], rootbegin[0:nwarp+1], nodebegin[0:nwarp+1]) if(nt->compute_gpu) async(nt->stream_id)) nrn_pragma_omp(target teams loop if(nt->compute_gpu)) for(int icore=0;icore< ncore;icore+=warpsize) { int iwarp=icore/warpsize;int ic=icore &(warpsize - 1);int ncycle=ncycles[iwarp];int *stride=strides+stridedispl[iwarp];int root=rootbegin[iwarp];int lastroot=rootbegin[iwarp+1];int firstnode=nodebegin[iwarp];int lastnode=nodebegin[iwarp+1];triang_interleaved2(nt, ic, ncycle, stride, lastnode);bksub_interleaved2(nt, root+ic, lastroot, ic, ncycle, stride, firstnode);} nrn_pragma_acc(wait(nt->stream_id))}void solve_interleaved1(int ith) { NrnThread *nt=nrn_threads+ith;int ncell=nt-> ncell
void solve_interleaved2_launcher(NrnThread *nt, InterleaveInfo *info, int ncore, void *stream)
CUDA branch of the solve_interleaved with interleave_permute_type == 2.
void destroy_interleave_info()
InterleaveInfo & operator=(const InterleaveInfo &)
void solve_interleaved(int ith)
Solve the Hines matrices based on the interleave_permute_type (1 or 2).
void copy_array(T *&dest, T *src, size_t n)
void create_interleave_info()
void * ecalloc_align(size_t n, size_t size, size_t alignment)
int int int int int int firstnode