@@ -86,17 +86,7 @@ namespace cubool {
8686 }
8787 }
8888
89- CudaInstance::MemType CudaInstance::getMemoryType () const {
90- return mMemoryType ;
91- }
92-
93- bool CudaInstance::isCudaDeviceSupported () {
94- int device;
95- cudaError error = cudaGetDevice (&device);
96- return error == cudaSuccess;
97- }
98-
99- void CudaInstance::queryDeviceCapabilities (cuBool_DeviceCaps &deviceCaps) {
89+ void CudaInstance::queryDeviceCapabilities (cuBool_DeviceCaps &deviceCaps) const {
10090 const unsigned long long KiB = 1024 ;
10191
10292 int device;
@@ -109,6 +99,7 @@ namespace cubool {
10999 if (error == cudaSuccess) {
110100 strcpy (deviceCaps.name , deviceProp.name );
111101 deviceCaps.cudaSupported = true ;
102+ deviceCaps.managedMem = mMemoryType == MemType::Managed;
112103 deviceCaps.minor = deviceProp.minor ;
113104 deviceCaps.major = deviceProp.major ;
114105 deviceCaps.warp = deviceProp.warpSize ;
@@ -119,6 +110,16 @@ namespace cubool {
119110 }
120111 }
121112
113+ CudaInstance::MemType CudaInstance::getMemoryType () const {
114+ return mMemoryType ;
115+ }
116+
117+ bool CudaInstance::isCudaDeviceSupported () {
118+ int device;
119+ cudaError error = cudaGetDevice (&device);
120+ return error == cudaSuccess;
121+ }
122+
122123 void CudaInstance::allocate (void * &ptr, size_t size) const {
123124 ptr = malloc (size);
124125 CHECK_RAISE_ERROR (ptr != nullptr , MemOpFailed, " Failed to allocate memory on the CPU" );
0 commit comments