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

Method Import

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

Source from the content-addressed store, hash-verified

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