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

Function AsCudaMemoryManager

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

Source from the content-addressed store, hash-verified

510bool IsCudaMemoryManager(const MemoryManager& mm) { return IsCudaDevice(*mm.device()); }
511
512Result<std::shared_ptr<CudaMemoryManager>> AsCudaMemoryManager(
513 const std::shared_ptr<MemoryManager>& mm) {
514 if (IsCudaMemoryManager(*mm)) {
515 return checked_pointer_cast<CudaMemoryManager>(mm);
516 } else {
517 return Status::TypeError("Device is not a Cuda device: ", mm->device()->ToString());
518 }
519}
520
521// ----------------------------------------------------------------------
522// CudaDeviceManager implementation

Callers 1

SetUpMethod · 0.85

Calls 4

IsCudaMemoryManagerFunction · 0.85
TypeErrorFunction · 0.50
ToStringMethod · 0.45
deviceMethod · 0.45

Tested by 1

SetUpMethod · 0.68