1 #ifndef HeterogeneousCore_CUDACore_src_getCachingDeviceAllocator
2 #define HeterogeneousCore_CUDACore_src_getCachingDeviceAllocator
14 namespace cms::cuda::allocator {
16 LogDebug(
"CachingDeviceAllocator").log([](
auto&
log) {
17 log <<
"cub::CachingDeviceAllocator settings\n"
19 <<
" min bin " <<
minBin <<
"\n"
20 <<
" max bin " <<
maxBin <<
"\n"
21 <<
" resulting bins:\n";
24 if (binSize >= (1 << 30) and binSize % (1 << 30) == 0) {
25 log <<
" " << std::setw(8) << (binSize >> 30) <<
" GB\n";
26 }
else if (binSize >= (1 << 20) and binSize % (1 << 20) == 0) {
27 log <<
" " << std::setw(8) << (binSize >> 20) <<
" MB\n";
28 }
else if (binSize >= (1 << 10) and binSize % (1 << 10) == 0) {
29 log <<
" " << std::setw(8) << (binSize >> 10) <<
" kB\n";
31 log <<
" " << std::setw(9) << binSize <<
" B\n";
34 log <<
" maximum amount of cached memory: " << (
minCachedBytes() >> 20) <<
" MB\n";
static std::vector< std::string > checklist log
constexpr unsigned int maxBin
A simple caching allocator for device memory allocations.
static unsigned int IntPow(unsigned int base, unsigned int exp)
notcub::CachingDeviceAllocator & getCachingDeviceAllocator()
constexpr unsigned int binGrowth
constexpr unsigned int minBin