I am working on a lightweight container that should work well on GPUs which aids porting an application to CUDA. The container is templated around a value type like many standard template library containers. This template container has a method which I would like to have matching execution space modifiers for a certain constructor on the value type class.
I could easily do this with SFINAE if there were something similar to
std::is_constructible, but instead CUDA specializations looking like
is_host_constructible. Which would inherit from
std::true_type if the matching constructor has a
__device__ qualified version, and so on.
I have played a little bit trying to implement this, but with no luck. Is this even possible in CUDA?