pitrou commented on code in PR #39980:
URL: https://github.com/apache/arrow/pull/39980#discussion_r1483235845
##########
cpp/src/arrow/c/bridge.cc:
##########
@@ -1977,6 +1978,24 @@ Result<std::shared_ptr<Array>> ImportDeviceArray(struct
ArrowDeviceArray* array,
return ImportDeviceArray(array, *maybe_type, mapper);
}
+Result<std::shared_ptr<MemoryManager>> DefaultDeviceMapper(ArrowDeviceType
device_type,
+ int64_t device_id) {
+ if (device_type != ARROW_DEVICE_CPU) {
+ return Status::NotImplemented("Only importing data on CPU is supported");
+ }
Review Comment:
Yes, there probably should be some kind of registry so that device mappers
can be added separately.
##########
cpp/src/arrow/c/bridge.cc:
##########
@@ -1977,6 +1978,24 @@ Result<std::shared_ptr<Array>> ImportDeviceArray(struct
ArrowDeviceArray* array,
return ImportDeviceArray(array, *maybe_type, mapper);
}
+Result<std::shared_ptr<MemoryManager>> DefaultDeviceMapper(ArrowDeviceType
device_type,
+ int64_t device_id) {
+ if (device_type != ARROW_DEVICE_CPU) {
+ return Status::NotImplemented("Only importing data on CPU is supported");
+ }
Review Comment:
Yes, there probably should be some kind of registry so that "default" device
mappers can be added separately.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]