1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-16 23:07:05 +01:00

Merge branch 'feature/hadrons' into feature/hadrons-new-memory-model

This commit is contained in:
2017-11-01 19:24:51 +00:00
120 changed files with 23226 additions and 7457 deletions

View File

@ -253,10 +253,12 @@ public:
_Tp * ptr = (_Tp *) memalign(GRID_ALLOC_ALIGN, bytes);
#endif
uint8_t *cp = (uint8_t *)ptr;
if ( ptr ) {
// One touch per 4k page, static OMP loop to catch same loop order
#pragma omp parallel for schedule(static)
for(size_type n=0;n<bytes;n+=4096){
cp[n]=0;
for(size_type n=0;n<bytes;n+=4096){
cp[n]=0;
}
}
return ptr;
}