mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
Thread loops done properly
This commit is contained in:
parent
408b868475
commit
65f77112e0
@ -169,9 +169,9 @@ public:
|
|||||||
// std::cout << "alignedAllocator " << std::hex << ptr <<std::dec <<std::endl;
|
// std::cout << "alignedAllocator " << std::hex << ptr <<std::dec <<std::endl;
|
||||||
// First touch optimise in threaded loop
|
// First touch optimise in threaded loop
|
||||||
uint8_t *cp = (uint8_t *)ptr;
|
uint8_t *cp = (uint8_t *)ptr;
|
||||||
thread_loop(size_type n=0;n<bytes;n+=4096){
|
thread_loop( (size_type n=0;n<bytes;n+=4096) , {
|
||||||
cp[n]=0;
|
cp[n]=0;
|
||||||
}
|
});
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -274,9 +274,9 @@ public:
|
|||||||
uint8_t *cp = (uint8_t *)ptr;
|
uint8_t *cp = (uint8_t *)ptr;
|
||||||
if ( ptr ) {
|
if ( ptr ) {
|
||||||
// One touch per 4k page, static OMP loop to catch same loop order
|
// One touch per 4k page, static OMP loop to catch same loop order
|
||||||
thread_loop(size_type n=0;n<bytes;n+=4096){
|
thread_loop( (size_type n=0;n<bytes;n+=4096),{
|
||||||
cp[n]=0;
|
cp[n]=0;
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
return ptr;
|
return ptr;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user