diff --git a/Grid/allocator/AlignedAllocator.h b/Grid/allocator/AlignedAllocator.h index 77167299..2976aed7 100644 --- a/Grid/allocator/AlignedAllocator.h +++ b/Grid/allocator/AlignedAllocator.h @@ -92,6 +92,13 @@ public: static bool debug; }; +#ifdef GRID_NVCC +#define profilerCudaMeminfo \ + { size_t f, t ; cudaMemGetInfo ( &f,&t); std::cout << GridLogDebug << "[Memory debug] Cuda free "<totalFreed) \ << std::endl; \ - } + } \ + profilerCudaMeminfo; #define profilerAllocate(bytes) \ if (MemoryProfiler::stats) \