MCPcopy Create free account
hub / github.com/apache/arrow / GetDeviceAddress

Method GetDeviceAddress

cpp/src/arrow/gpu/cuda_context.cc:748–755  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746int CudaContext::device_number() const { return impl_->device()->device_number(); }
747
748Result<uintptr_t> CudaContext::GetDeviceAddress(uintptr_t addr) {
749 ContextSaver set_temporary(*this);
750 CUdeviceptr ptr;
751 CU_RETURN_NOT_OK("cuPointerGetAttribute",
752 cuPointerGetAttribute(&ptr, CU_POINTER_ATTRIBUTE_DEVICE_POINTER,
753 static_cast<CUdeviceptr>(addr)));
754 return static_cast<uintptr_t>(ptr);
755}
756
757Result<uintptr_t> CudaContext::GetDeviceAddress(uint8_t* addr) {
758 return GetDeviceAddress(reinterpret_cast<uintptr_t>(addr));

Callers

nothing calls this directly

Calls 1

GetDeviceAddressFunction · 0.85

Tested by

no test coverage detected