1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-09 21:50:45 +01:00

Clean up debug prints

This commit is contained in:
Peter Boyle 2018-03-20 06:33:59 -04:00
parent a5cfb89304
commit ac29ebcb95

View File

@ -165,10 +165,10 @@ public:
pointer ptr = nullptr; pointer ptr = nullptr;
#endif #endif
//////////////////
// Hack 2MB align; could make option probably doesn't need configurability
//////////////////
#ifdef GRID_NVCC #ifdef GRID_NVCC
////////////////////////////////////
// Unified (managed) memory
////////////////////////////////////
if ( ptr == (_Tp *) NULL ) { if ( ptr == (_Tp *) NULL ) {
if( cudaMallocManaged((void **)&ptr,bytes) != cudaSuccess ) { if( cudaMallocManaged((void **)&ptr,bytes) != cudaSuccess ) {
ptr = (_Tp *) NULL; ptr = (_Tp *) NULL;
@ -176,6 +176,9 @@ public:
} }
} }
#else #else
//////////////////////////////////////////////////////////////////////////////////////////
// 2MB align; could make option probably doesn't need configurability
//////////////////////////////////////////////////////////////////////////////////////////
#ifdef HAVE_MM_MALLOC_H #ifdef HAVE_MM_MALLOC_H
if ( ptr == (_Tp *) NULL ) ptr = (_Tp *) _mm_malloc(bytes,GRID_ALLOC_ALIGN); if ( ptr == (_Tp *) NULL ) ptr = (_Tp *) _mm_malloc(bytes,GRID_ALLOC_ALIGN);
#else #else
@ -183,6 +186,7 @@ public:
#endif #endif
#endif #endif
assert( ptr != (_Tp *)NULL); assert( ptr != (_Tp *)NULL);
///////////////////////////////////////// /////////////////////////////////////////
// First touch optimise in threaded loop // First touch optimise in threaded loop
///////////////////////////////////////// /////////////////////////////////////////