RSE-Sheffield/COMCUDA_mosaic_assignment

cudaGetPointAttributes() for validating pointers passed to helper methods

Opened this issue · 0 comments

From @ptheywood's original comment

It may be worth adding use of cudaPointerGetAttributes in the validation methods (assuming cuda is always available) to detect when users pass device pointers to the validation methods, and provide them with a useful error message.
CUDA 11.0+ this should be relatively simple (if the docs are to be belived), older CUDA's will need some manual error handling in the case of unregistered host pointers (I.e. the expected use case).

CUDA's that didnt' support UVA on windows might not like this at all either. Shouldn't be an issue though as Windows + UVA has been supported since ~ CUDA 8 IIRC.

Docs

Related: RSE-Sheffield/COMCUDA_CLAHE_assignment#4