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

Speed up Cshift

This commit is contained in:
Peter Boyle
2020-05-11 17:02:01 -04:00
parent 8c31c065b5
commit 07c0c02f8c
12 changed files with 373 additions and 265 deletions

View File

@ -29,7 +29,6 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
#ifndef GRID_ALIGNED_ALLOCATOR_H
#define GRID_ALIGNED_ALLOCATOR_H
NAMESPACE_BEGIN(Grid);
/*Move control to configure.ac and Config.h*/
@ -157,6 +156,15 @@ public:
assert( ( (_Tp*)ptr != (_Tp *)NULL ) );
#if 0
size_type page_size=4096;
size_type pages = (bytes+page_size-1)/page_size;
uint8_t *bp = (uint8_t *)ptr;
accelerator_for(pg,pages,1,{
bp[pg*page_size]=0;
});
#endif
return ptr;
}