cupy.cuda.texture.ResourceDescriptor#
- class cupy.cuda.texture.ResourceDescriptor(int restype, CUDAarray cuArr=None, ndarray arr=None, ChannelFormatDescriptor chDesc=None, size_t sizeInBytes=0, size_t width=0, size_t height=0, size_t pitchInBytes=0)[source]#
A class that holds the resource description. Equivalent to
cudaResourceDesc.- Parameters:
restype (int) – the resource type. Use one of the values in
cudaResourceType*, such ascupy.cuda.runtime.cudaResourceTypeArray.cuArr (CUDAarray, optional) – An instance of
CUDAarray, required ifrestypeis set tocupy.cuda.runtime.cudaResourceTypeArray.arr (cupy.ndarray, optional) – An instance of
ndarray, required ifrestypeis set tocupy.cuda.runtime.cudaResourceTypeLinearorcupy.cuda.runtime.cudaResourceTypePitch2D.chDesc (ChannelFormatDescriptor, optional) – an instance of
ChannelFormatDescriptor, required ifrestypeis set tocupy.cuda.runtime.cudaResourceTypeLinearorcupy.cuda.runtime.cudaResourceTypePitch2D.sizeInBytes (int, optional) – total bytes in the linear memory, required if
restypeis set tocupy.cuda.runtime.cudaResourceTypeLinear.width (int, optional) – the width (in elements) of the 2D array, required if
restypeis set tocupy.cuda.runtime.cudaResourceTypePitch2D.height (int, optional) – the height (in elements) of the 2D array, required if
restypeis set tocupy.cuda.runtime.cudaResourceTypePitch2D.pitchInBytes (int, optional) – the number of bytes per pitch-aligned row, required if
restypeis set tocupy.cuda.runtime.cudaResourceTypePitch2D.
Note
A texture backed by mipmap arrays is currently not supported in CuPy.
See also
Methods
- get_resource_desc(self)#
Returns a dict containing the input.
- __eq__(value, /)#
Return self==value.
- __ne__(value, /)#
Return self!=value.
- __lt__(value, /)#
Return self<value.
- __le__(value, /)#
Return self<=value.
- __gt__(value, /)#
Return self>value.
- __ge__(value, /)#
Return self>=value.
Attributes
- arr#
- chDesc#
- cuArr#
- ptr#