Commit 0e105eae authored by Allison Vacanti's avatar Allison Vacanti
Browse files

cudaPointerAttributes::isManaged deprecated in CUDA 10.

Update code to support both the old and new way of checking this.
parent 8d0f441e
......@@ -101,7 +101,11 @@ bool CudaAllocator::IsManagedPointer(const void* ptr)
return false;
}
VTKM_CUDA_CALL(err /*= cudaPointerGetAttributes(&attr, ptr)*/);
#if CUDART_VERSION < 10000 // isManaged deprecated in CUDA 10.
return attr.isManaged != 0;
#else // attr.type doesn't exist before CUDA 10
return attr.type == cudaMemoryTypeManaged;
#endif
}
void* CudaAllocator::Allocate(std::size_t numBytes)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment