mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Fix the fence
This commit is contained in:
parent
d32b923b6c
commit
84110166e4
@ -248,12 +248,6 @@ inline int acceleratorIsCommunicable(void *ptr)
|
|||||||
// SyCL acceleration
|
// SyCL acceleration
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
#ifdef GRID_SYCL
|
#ifdef GRID_SYCL
|
||||||
inline void acceleratorFenceComputeStream(void){ accelerator_barrier();};
|
|
||||||
#else
|
|
||||||
// Ordering within a stream guaranteed on Nvidia & AMD
|
|
||||||
inline void acceleratorFenceComputeStream(void){ };
|
|
||||||
#endif
|
|
||||||
#ifdef GRID_SYCL
|
|
||||||
NAMESPACE_END(Grid);
|
NAMESPACE_END(Grid);
|
||||||
#include <CL/sycl.hpp>
|
#include <CL/sycl.hpp>
|
||||||
#include <CL/sycl/usm.hpp>
|
#include <CL/sycl/usm.hpp>
|
||||||
@ -517,7 +511,16 @@ inline void *acceleratorAllocCpu(size_t bytes){return memalign(GRID_ALLOC_ALIGN,
|
|||||||
inline void acceleratorFreeCpu (void *ptr){free(ptr);};
|
inline void acceleratorFreeCpu (void *ptr){free(ptr);};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//////////////////////////////////////////////
|
||||||
|
// Fencing needed ONLY for SYCL
|
||||||
|
//////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef GRID_SYCL
|
||||||
|
inline void acceleratorFenceComputeStream(void){ accelerator_barrier();};
|
||||||
|
#else
|
||||||
|
// Ordering within a stream guaranteed on Nvidia & AMD
|
||||||
|
inline void acceleratorFenceComputeStream(void){ };
|
||||||
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////
|
///////////////////////////////////////////////////
|
||||||
// Synchronise across local threads for divergence resynch
|
// Synchronise across local threads for divergence resynch
|
||||||
|
Loading…
x
Reference in New Issue
Block a user