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

Method Allocate

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

Source from the content-addressed store, hash-verified

646CudaContext::~CudaContext() {}
647
648Result<std::unique_ptr<CudaBuffer>> CudaContext::Allocate(int64_t nbytes) {
649 uint8_t* data = nullptr;
650 RETURN_NOT_OK(impl_->Allocate(nbytes, &data));
651 return std::make_unique<CudaBuffer>(data, nbytes, this->shared_from_this(), true);
652}
653
654Result<std::shared_ptr<CudaBuffer>> CudaContext::View(uint8_t* data, int64_t nbytes) {
655 return std::make_shared<CudaBuffer>(data, nbytes, this->shared_from_this(), false);

Callers 3

AllocateBufferMethod · 0.45
CopyNonOwnedFromMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected