mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-13 01:05:36 +00:00
Bug fix to Example_Laplacian test
This commit is contained in:
parent
5b3c530aa7
commit
0d588b95f4
@ -39,6 +39,10 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
|||||||
#ifdef HAVE_MM_MALLOC_H
|
#ifdef HAVE_MM_MALLOC_H
|
||||||
#include <mm_malloc.h>
|
#include <mm_malloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __APPLE__
|
||||||
|
// no memalign
|
||||||
|
inline void *memalign(size_t align, size_t bytes) { return malloc(bytes); }
|
||||||
|
#endif
|
||||||
|
|
||||||
NAMESPACE_BEGIN(Grid);
|
NAMESPACE_BEGIN(Grid);
|
||||||
|
|
||||||
@ -419,6 +423,8 @@ inline void acceleratorMemSet(void *base,int value,size_t bytes) { hipMemset(bas
|
|||||||
|
|
||||||
#undef GRID_SIMT
|
#undef GRID_SIMT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define accelerator
|
#define accelerator
|
||||||
#define accelerator_inline strong_inline
|
#define accelerator_inline strong_inline
|
||||||
#define accelerator_for(iterator,num,nsimd, ... ) thread_for(iterator, num, { __VA_ARGS__ });
|
#define accelerator_for(iterator,num,nsimd, ... ) thread_for(iterator, num, { __VA_ARGS__ });
|
||||||
|
@ -116,7 +116,6 @@ public:
|
|||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
// Arithmetic expressions
|
// Arithmetic expressions
|
||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
StencilEntry *SE;
|
|
||||||
|
|
||||||
// Views; device friendly/accessible pointers
|
// Views; device friendly/accessible pointers
|
||||||
auto st = Stencil.View(AcceleratorRead);
|
auto st = Stencil.View(AcceleratorRead);
|
||||||
@ -129,10 +128,11 @@ public:
|
|||||||
|
|
||||||
const int Nsimd = vobj::Nsimd();
|
const int Nsimd = vobj::Nsimd();
|
||||||
const uint64_t NN = grid->oSites();
|
const uint64_t NN = grid->oSites();
|
||||||
const int lane=acceleratorSIMTlane(Nsimd);
|
|
||||||
|
|
||||||
accelerator_for( ss, NN, Nsimd, {
|
accelerator_for( ss, NN, Nsimd, {
|
||||||
|
|
||||||
|
StencilEntry *SE;
|
||||||
|
|
||||||
const int lane=acceleratorSIMTlane(Nsimd);
|
const int lane=acceleratorSIMTlane(Nsimd);
|
||||||
|
|
||||||
calcObj chi;
|
calcObj chi;
|
||||||
@ -202,7 +202,6 @@ public:
|
|||||||
///////////////////////////////////
|
///////////////////////////////////
|
||||||
auto st = Stencil.View(AcceleratorRead);
|
auto st = Stencil.View(AcceleratorRead);
|
||||||
auto buf = st.CommBuf();
|
auto buf = st.CommBuf();
|
||||||
StencilEntry *SE;
|
|
||||||
|
|
||||||
autoView( in , _in , AcceleratorRead);
|
autoView( in , _in , AcceleratorRead);
|
||||||
autoView( out , _out , AcceleratorWrite);
|
autoView( out , _out , AcceleratorWrite);
|
||||||
@ -214,9 +213,11 @@ public:
|
|||||||
|
|
||||||
const int Nsimd = vobj::Nsimd();
|
const int Nsimd = vobj::Nsimd();
|
||||||
const uint64_t NN = grid->oSites();
|
const uint64_t NN = grid->oSites();
|
||||||
const int lane=acceleratorSIMTlane(Nsimd);
|
|
||||||
accelerator_for( ss, NN, Nsimd, {
|
accelerator_for( ss, NN, Nsimd, {
|
||||||
|
|
||||||
|
StencilEntry *SE;
|
||||||
|
|
||||||
const int lane=acceleratorSIMTlane(Nsimd);
|
const int lane=acceleratorSIMTlane(Nsimd);
|
||||||
|
|
||||||
calcObj chi;
|
calcObj chi;
|
||||||
|
Loading…
Reference in New Issue
Block a user