1 #ifndef HeterogeneousCore_CUDACore_src_getCachingHostAllocator
2 #define HeterogeneousCore_CUDACore_src_getCachingHostAllocator
17 LogDebug(
"CachingHostAllocator").log([](
auto&
log) {
18 log <<
"cub::CachingHostAllocator settings\n"
20 <<
" min bin " <<
minBin <<
"\n"
21 <<
" max bin " <<
maxBin <<
"\n"
22 <<
" resulting bins:\n";
25 if (binSize >= (1 << 30) and binSize % (1 << 30) == 0) {
26 log <<
" " << std::setw(8) << (binSize >> 30) <<
" GB\n";
27 }
else if (binSize >= (1 << 20) and binSize % (1 << 20) == 0) {
28 log <<
" " << std::setw(8) << (binSize >> 20) <<
" MB\n";
29 }
else if (binSize >= (1 << 10) and binSize % (1 << 10) == 0) {
30 log <<
" " << std::setw(8) << (binSize >> 10) <<
" kB\n";
32 log <<
" " << std::setw(9) << binSize <<
" B\n";
35 log <<
" maximum amount of cached memory: " << (
minCachedBytes() >> 20) <<
" MB\n";
static std::vector< std::string > checklist log
constexpr unsigned int maxBin
static unsigned int IntPow(unsigned int base, unsigned int exp)
notcub::CachingHostAllocator & getCachingHostAllocator()
constexpr unsigned int binGrowth
A simple caching allocator pinned host memory allocations.
constexpr unsigned int minBin