zeroshade commented on code in PR #34972: URL: https://github.com/apache/arrow/pull/34972#discussion_r1161909615
########## cpp/src/arrow/c/abi.h: ########## @@ -65,6 +65,69 @@ struct ArrowArray { #endif // ARROW_C_DATA_INTERFACE +#ifndef ARROW_C_DEVICE_DATA_INTERFACE +#define ARROW_C_DEVICE_DATA_INTERFACE + +// ArrowDeviceType is compatible with dlpack DLDeviceType for portability +// it uses the same values for each enum as the equivalent kDL<type> from dlpack.h +#ifdef __cplusplus +typedef enum : int32_t { +#else +typedef enum { +#endif + // CPU device, same as using ArrowArray directly + kArrowCPU = 1, Review Comment: I don't think so, it would be invalid for the device_type to be any value that is *not* one of the macro values, an `unset` should most likely be the CPU value. I can't think of a valid use case to have an `unset` value. If someone can think of a valid use case for an "unset" value, i'm happy to add one. But i'd rather not add one for the sake of having one if it would technically be invalid for it to ever be used. -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org