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

Method CudaBufferReader

cpp/src/arrow/gpu/cuda_memory.cc:221–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219// CudaBufferReader
220
221CudaBufferReader::CudaBufferReader(const std::shared_ptr<Buffer>& buffer)
222 : address_(buffer->address()), size_(buffer->size()), position_(0), is_open_(true) {
223 auto maybe_buffer = CudaBuffer::FromBuffer(buffer);
224 if (ARROW_PREDICT_FALSE(!maybe_buffer.ok())) {
225 throw std::bad_cast();
226 }
227 buffer_ = *std::move(maybe_buffer);
228 context_ = buffer_->context();
229}
230
231Status CudaBufferReader::DoClose() {
232 is_open_ = false;

Callers

nothing calls this directly

Calls 4

addressMethod · 0.80
contextMethod · 0.80
sizeMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected