pub unsafe extern "C" fn cuTexRefSetAddressMode(
hTexRef: CUtexref,
dim: c_int,
am: CUaddress_mode,
) -> CUresultExpand description
Sets the addressing mode for a texture reference.
Specifies the addressing mode am for the given dimension dim of the texture reference hTexRef. If dim is zero, the addressing mode is applied to the first parameter of the functions used to fetch from the texture; if dim is 1, the second, and so on. CUaddress_mode is defined as:
typedef enum CUaddress_mode_enum {
CU_TR_ADDRESS_MODE_WRAP = 0,
CU_TR_ADDRESS_MODE_CLAMP = 1,
CU_TR_ADDRESS_MODE_MIRROR = 2,
CU_TR_ADDRESS_MODE_BORDER = 3
} CUaddress_mode;Note that this call has no effect if hTexRef is bound to linear memory. Also, if the flag, CU_TRSF_NORMALIZED_COORDINATES, is not set, the only supported address mode is CUaddress_mode_enum::CU_TR_ADDRESS_MODE_CLAMP.
§Parameters
hTexRef: Texture reference.dim: Dimension.am: Addressing mode to set.
§Return value
CUresult::CUDA_SUCCESSCUresult::CUDA_ERROR_DEINITIALIZEDCUresult::CUDA_ERROR_NOT_INITIALIZEDCUresult::CUDA_ERROR_INVALID_CONTEXTCUresult::CUDA_ERROR_INVALID_VALUE
See also: cuTexRefSetAddress_v2, cuTexRefSetAddress2D, cuTexRefSetArray, cuTexRefSetFilterMode, cuTexRefSetFlags, cuTexRefSetFormat, cuTexRefGetAddress_v2, cuTexRefGetAddressMode, cuTexRefGetArray, cuTexRefGetFilterMode, cuTexRefGetFlags, cuTexRefGetFormat.