1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-12-23 14:14:30 +00:00

Remove Gpu only kernels.

This commit is contained in:
Peter Boyle
2019-06-09 11:20:01 +01:00
parent 9fbcfe612c
commit 3e41b1055c
8 changed files with 64 additions and 321 deletions

View File

@@ -38,6 +38,19 @@ NAMESPACE_BEGIN(Grid);
////////////////////////////////////////////
// Generic implementation; move to different file?
////////////////////////////////////////////
accelerator_inline void get_stencil(StencilEntry * mem, StencilEntry &chip)
{
#ifdef __CUDA_ARCH__
static_assert(sizeof(StencilEntry)==sizeof(uint4),"Unexpected Stencil Entry Size");
uint4 * mem_pun = (uint4 *)mem; // force 128 bit loads
uint4 * chip_pun = (uint4 *)&chip;
* chip_pun = * mem_pun;
#else
chip = *mem;
#endif
return;
}
#define GENERIC_STENCIL_LEG(Dir,spProj,Recon) \
SE = st.GetEntry(ptype, Dir, sF); \