@@ -44,35 +44,13 @@ namespace cubool {
4444 void Instance::allocate (void * &ptr, size_t size) const {
4545 ptr = malloc (size);
4646 CHECK_RAISE_ERROR (ptr != nullptr , MemOpFailed, " Failed to allocate memory on the CPU" );
47+ mHostAllocCount ++;
4748 }
4849
4950 void Instance::deallocate (void * ptr) const {
5051 CHECK_RAISE_ERROR (ptr != nullptr , InvalidArgument, " Passed null ptr to free" );
5152 free (ptr);
52- }
53-
54- void Instance::printDeviceCapabilities () const {
55- static const size_t BUFFER_SIZE = 1024 ;
56-
57- cuBool_DeviceCaps deviceCaps;
58- queryDeviceCapabilities (deviceCaps);
59-
60- char deviceInfo[BUFFER_SIZE];
61- snprintf (deviceInfo, BUFFER_SIZE, " Device name: %s version: %i.%i" ,
62- deviceCaps.name , deviceCaps.major , deviceCaps.major );
63-
64- char memoryInfo[BUFFER_SIZE];
65- snprintf (memoryInfo, BUFFER_SIZE, " Global memory: %llu KiB" ,
66- (unsigned long long ) deviceCaps.globalMemoryKiBs );
67-
68- char sharedMemoryInfo[BUFFER_SIZE];
69- snprintf (sharedMemoryInfo, BUFFER_SIZE, " Shared memory: multi-proc %llu KiB block %llu KiB" ,
70- (unsigned long long ) deviceCaps.sharedMemoryPerMultiProcKiBs , (unsigned long long ) deviceCaps.sharedMemoryPerBlockKiBs );
71-
72- char structInfo[BUFFER_SIZE];
73- snprintf (structInfo, BUFFER_SIZE, " Kernel: warp %llu" , (unsigned long long ) deviceCaps.warp );
74-
75- // todo
53+ mHostAllocCount --;
7654 }
7755
7856 Instance& Instance::getInstanceRef () {
0 commit comments