| 4344 | } |
| 4345 | |
| 4346 | static ArrayFactory ToDeviceFactory(const std::shared_ptr<MemoryManager>& mm, |
| 4347 | ArrayFactory&& factory) { |
| 4348 | return [&]() -> Result<std::shared_ptr<Array>> { |
| 4349 | ARROW_ASSIGN_OR_RAISE(auto arr, factory()); |
| 4350 | return ToDevice(mm, *arr->data()); |
| 4351 | }; |
| 4352 | } |
| 4353 | |
| 4354 | static ArrayFactory JSONArrayFactory(const std::shared_ptr<MemoryManager>& mm, |
| 4355 | std::shared_ptr<DataType> type, const char* json) { |