jorisvandenbossche commented on code in PR #40699:
URL: https://github.com/apache/arrow/pull/40699#discussion_r1540635709
##########
cpp/src/arrow/device.h:
##########
@@ -363,4 +363,33 @@ class ARROW_EXPORT CPUMemoryManager : public MemoryManager
{
ARROW_EXPORT
std::shared_ptr<MemoryManager> default_cpu_memory_manager();
+using MemoryMapper =
+ std::function<Result<std::shared_ptr<MemoryManager>>(int64_t device_id)>;
Review Comment:
I think that sounds good for the function type alias, but then I would
personally leave the register/get functions as is? I would find
`RegisterDeviceIdMapper` a bit strange with the focus on the `id`, because you
are also registering a device _type_, it's just that the value you store for
the registered _type_ is the DeviceIdMapper ..
Anyway, in the end it doesn't matter that much, happy to go with whatever we
come up with.
--
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]