Hello,
I am working on a piece of code that takes a pointer P to a block allocated with CUDA, its size N and an enum specifying whether the block should be read or written. I don’t know if cudaMalloc() or cudaMallocManaged() was used for the allocation. The case of unified memory allows for the simple handling of content, whereas I also want to be able to work with unmanaged device blocks if they are provided.
How can I detect if P comes from the unified pool?