1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

CPU compile ordering is important

This commit is contained in:
Peter Boyle 2024-05-21 02:22:32 +01:00
parent 394e506aea
commit c4b9f71357

View File

@ -539,12 +539,6 @@ inline void acceleratorCopySynchronise(void) { auto discard=hipStreamSynchronize
#endif #endif
inline void acceleratorCopyDeviceToDevice(void *from,void *to,size_t bytes)
{
acceleratorCopyDeviceToDeviceAsynch(from,to,bytes);
acceleratorCopySynchronise();
}
////////////////////////////////////////////// //////////////////////////////////////////////
// CPU Target - No accelerator just thread instead // CPU Target - No accelerator just thread instead
////////////////////////////////////////////// //////////////////////////////////////////////
@ -553,7 +547,6 @@ inline void acceleratorCopyDeviceToDevice(void *from,void *to,size_t bytes)
#undef GRID_SIMT #undef GRID_SIMT
inline void acceleratorMem(void) inline void acceleratorMem(void)
{ {
/* /*
@ -656,6 +649,12 @@ accelerator_inline void acceleratorFence(void)
return; return;
} }
inline void acceleratorCopyDeviceToDevice(void *from,void *to,size_t bytes)
{
acceleratorCopyDeviceToDeviceAsynch(from,to,bytes);
acceleratorCopySynchronise();
}
template<class T> void acceleratorPut(T& dev,T&host) template<class T> void acceleratorPut(T& dev,T&host)
{ {
acceleratorCopyToDevice(&host,&dev,sizeof(T)); acceleratorCopyToDevice(&host,&dev,sizeof(T));