public static extern CUResult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, uint Flags);
public static extern CUResult cuTexRefSetFilterMode(CUtexref hTexRef, CUFilterMode fm);
public static extern CUResult cuTexRefSetAddress2D_v3(CUtexref hTexRef, CUDAArrayDescriptor desc, CUdeviceptr dptr, SizeT Pitch);
public static extern CUResult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUAddressMode am);
public static extern CUResult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef);
public static extern CUResult cuTexRefSetAddress(ref uint ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, SizeT bytes);
public static extern CUResult cuTexRefGetFilterMode(ref CUFilterMode pfm, CUtexref hTexRef);
/// <summary> /// set cuda texture memory /// </summary> /// <param name="texture"></param> /// <param name="texName"></param> /// <param name="memPtr"></param> /// <param name="memSize"></param> private void SetTextureMemory(ref CUtexref texture, string texName, ref CUdeviceptr memPtr, uint memSize) { texture = cuda.GetModuleTexture(cuModule, texName); memPtr = cuda.Allocate(memSize); cuda.SetTextureAddress(texture, memPtr, memSize); }
public static extern CUResult cuTexRefGetAddressMode(ref CUAddressMode pam, CUtexref hTexRef, int dim);
public static extern CUResult cuTexRefGetArray(ref CUarray phArray, CUtexref hTexRef);
public static extern CUResult cuTexRefGetAddress(ref CUdeviceptr pdptr, CUtexref hTexRef);
public static extern CUResult cuTexRefDestroy(CUtexref hTexRef);
public static extern CUResult cuTexRefCreate(ref CUtexref pTexRef);
public static extern CUResult cuTexRefSetFlags(CUtexref hTexRef, uint Flags);
public static extern CUResult cuTexRefGetFlags(ref uint pFlags, CUtexref hTexRef);
public static extern CUResult cuTexRefSetFormat(CUtexref hTexRef, CUArrayFormat fmt, int NumPackedComponents);
public static extern CUResult cuTexRefGetFormat(ref CUArrayFormat pFormat, ref int pNumChannels, CUtexref hTexRef);
/// <summary> /// set cuda texture memory based on array /// </summary> /// <param name="texture"></param> /// <param name="texName"></param> /// <param name="data"></param> /// <param name="memPtr"></param> protected void SetTextureMemory(ref CUtexref texture, string texName, float[] data, ref CUdeviceptr memPtr) { texture = cuda.GetModuleTexture(cuModule, texName); memPtr = cuda.CopyHostToDevice(data); cuda.SetTextureAddress(texture, memPtr, (uint)(sizeof(float) * data.Length)); }
public static extern CUResult cuModuleGetTexRef(ref CUtexref pTexRef, CUmodule hmod, string name);