Closed mypmc closed 4 years ago
Hey, thanks for the pull request! Also, thanks for your patience.
For the most part this looks good. I do have one concern, though - are you sure the impls for DevicePointer (especially things like Hash and PartialOrd) won't dereference the inner raw pointer? It isn't a valid pointer in the sense that it doesn't refer to a value in the CPU's memory space, so any attempt to dereference that pointer will cause a segfault. I'd like to have some basic unit tests, just to execute this code just to be sure of that. Dereferencing a UnifiedPointer is fine, though.
Deriving generates code like
But pointer primitives in
std
do not constraint like that.