For consistency, and for reducing the number of API calls we need to make, the cuda::texture_view_t class should gain a device_id_ member alongside its context_handle_ member.
We can then return the context, when necessary, by simple wrapping of the device ID and context handle fields, with no extra API call.
In fact, we can also do this for array_t's, which we currently aren't doing.
For consistency, and for reducing the number of API calls we need to make, the
cuda::texture_view_t
class should gain adevice_id_
member alongside itscontext_handle_
member.We can then return the context, when necessary, by simple wrapping of the device ID and context handle fields, with no extra API call.
In fact, we can also do this for array_t's, which we currently aren't doing.