Loading src/dmrg_malloc.c +6 −0 Original line number Diff line number Diff line #include <stdlib.h> #include <stdio.h> #include "dmrg_vbatch.h" #ifdef USE_MAGMA Loading @@ -17,7 +18,12 @@ int dmrg_is_managed( const void *ptr ) struct cudaPointerAttributes attribute; cudaError_t ierr = cudaPointerGetAttributes( &attribute, ptr ); #if defined(CUDART_VERSION) && (CUDART_VERSION >= 10000) is_managed = (ierr == cudaSuccess) && (attribute.type == cudaMemoryTypeManaged); #else is_managed = (ierr == cudaSuccess) && attribute.isManaged; #endif #endif return( is_managed ); } Loading Loading
src/dmrg_malloc.c +6 −0 Original line number Diff line number Diff line #include <stdlib.h> #include <stdio.h> #include "dmrg_vbatch.h" #ifdef USE_MAGMA Loading @@ -17,7 +18,12 @@ int dmrg_is_managed( const void *ptr ) struct cudaPointerAttributes attribute; cudaError_t ierr = cudaPointerGetAttributes( &attribute, ptr ); #if defined(CUDART_VERSION) && (CUDART_VERSION >= 10000) is_managed = (ierr == cudaSuccess) && (attribute.type == cudaMemoryTypeManaged); #else is_managed = (ierr == cudaSuccess) && attribute.isManaged; #endif #endif return( is_managed ); } Loading