From 949be9605cf2d801439ec38ad85aa9554b29eb58 Mon Sep 17 00:00:00 2001 From: Christoph Lehner Date: Sat, 2 May 2020 16:20:03 -0400 Subject: [PATCH] fix pragmas --- Grid/lattice/Lattice_base.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Grid/lattice/Lattice_base.h b/Grid/lattice/Lattice_base.h index a16b4fa8..271ab43e 100644 --- a/Grid/lattice/Lattice_base.h +++ b/Grid/lattice/Lattice_base.h @@ -80,8 +80,10 @@ public: // Advise that the data is used infrequently. This can // significantly influence performance of bulk storage. accelerator_inline void AdviseInfrequentUse() { -#ifdef __CUDA_ARCH__ +#ifdef GRID_NVCC +#ifndef __CUDA_ARCH__ // only on host cudaMemAdvise(_odata,_odata_size*sizeof(vobj),cudaMemAdviseSetPreferredLocation,cudaCpuDeviceId); +#endif #endif }; };