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

Method Import

cpp/src/arrow/c/bridge.cc:1525–1537  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1523 : type_(type), zero_size_buffer_(std::make_shared<Buffer>(kZeroSizeArea, 0)) {}
1524
1525 Status Import(struct ArrowDeviceArray* src, const DeviceMemoryMapper& mapper) {
1526 ARROW_ASSIGN_OR_RAISE(memory_mgr_, mapper(src->device_type, src->device_id));
1527 device_type_ = static_cast<DeviceAllocationType>(src->device_type);
1528 RETURN_NOT_OK(Import(&src->array));
1529 if (src->sync_event != nullptr) {
1530 ARROW_ASSIGN_OR_RAISE(import_->device_sync_, memory_mgr_->WrapDeviceSyncEvent(
1531 src->sync_event, [](void*) {}));
1532 }
1533 // reset internal state before next import
1534 memory_mgr_.reset();
1535 device_type_ = DeviceAllocationType::kCPU;
1536 return Status::OK();
1537 }
1538
1539 Status Import(struct ArrowArray* src) {
1540 if (ArrowArrayIsReleased(src)) {

Callers 7

ImportTypeFunction · 0.45
ImportFieldFunction · 0.45
ImportSchemaFunction · 0.45
ImportArrayFunction · 0.45
ImportRecordBatchFunction · 0.45
ImportDeviceArrayFunction · 0.45
ImportDeviceRecordBatchFunction · 0.45

Calls 7

ArrowArrayIsReleasedFunction · 0.85
ArrowArrayMoveFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.50
OKFunction · 0.50
InvalidFunction · 0.50
WrapDeviceSyncEventMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected