cuda.bindings._v2.driver.tex_ref_set_address2d_v3#
- cuda.bindings._v2.driver.tex_ref_set_address2d_v3(
- intptr_t h_tex_ref,
- desc,
- uint64_t dptr,
- size_t pitch,
Binds an address as a 2D texture reference.
[Deprecated]. Binds a linear address range to the texture reference
h_tex_ref. Any previous address or CUDA array state associated with the texture reference is superseded by this function. Any memory previously bound toh_tex_refis unbound. Using atex2D()function inside a kernel requires a call to eithertex_ref_set_array()to bind the corresponding texture reference to an array, orcuTexRefSetAddress2D()to bind the texture reference to linear memory. Function calls totex_ref_set_format()cannot follow calls tocuTexRefSetAddress2D()for the same texture reference. It is required thatdptrbe aligned to the appropriate hardware-specific texture alignment. You can query this value using the device attributeCU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT. If an unaligneddptris supplied,CUDA_ERROR_INVALID_VALUEis returned.pitchhas to be aligned to the hardware-specific texture pitch alignment. This value can be queried using the device attributeCU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT. If an unalignedpitchis supplied,CUDA_ERROR_INVALID_VALUEis returned. Width and Height, which are specified in elements (or texels), cannot exceedCU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTHandCU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHTrespectively.pitch, which is specified in bytes, cannot exceedCU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH.- Parameters:
h_tex_ref (intptr_t) – Texture reference to bind.
desc (intptr_t) – Descriptor of CUDA array.
dptr (uint64_t) – Device pointer to bind.
pitch (size_t) – Line pitch in bytes.
See also
cuTexRefSetAddress2D_v3