/// <summary> /// /// </summary> /// <param name="var"></param> public CudaResourceDesc(CudaPitchedDeviceVariable<VectorTypes.uint4> var) { resType = CUResourceType.Pitch2D; flags = 0; res = new CudaResourceDescUnion(); res.hArray = new CUarray(); res.hMipmappedArray = new CUmipmappedArray(); res.linear = new CudaResourceDescLinear(); res.pitch2D = new CudaResourceDescPitch2D(); res.pitch2D.devPtr = var.DevicePointer; res.pitch2D.format = CUArrayFormat.UnsignedInt32; res.pitch2D.height = var.Height; res.pitch2D.numChannels = 4; res.pitch2D.pitchInBytes = var.Pitch; res.pitch2D.width = var.Width; }
/// <summary> /// /// </summary> /// <param name="var"></param> public CudaResourceDesc(CudaDeviceVariable<VectorTypes.uint4> var) { resType = CUResourceType.Linear; flags = 0; res = new CudaResourceDescUnion(); res.hArray = new CUarray(); res.hMipmappedArray = new CUmipmappedArray(); res.pitch2D = new CudaResourceDescPitch2D(); res.linear = new CudaResourceDescLinear(); res.linear.devPtr = var.DevicePointer; res.linear.format = CUArrayFormat.UnsignedInt32; res.linear.numChannels = 4; res.linear.sizeInBytes = var.SizeInBytes; }
/// <summary> /// /// </summary> /// <param name="var"></param> public CudaResourceDesc(CudaResourceDescPitch2D var) { resType = CUResourceType.Pitch2D; flags = 0; res = new CudaResourceDescUnion(); res.hArray = new CUarray(); res.hMipmappedArray = new CUmipmappedArray(); res.linear = new CudaResourceDescLinear(); res.pitch2D = var; }
/// <summary> /// /// </summary> /// <param name="var"></param> public CudaResourceDesc(CudaMipmappedArray var) { resType = CUResourceType.MipmappedArray; flags = 0; res = new CudaResourceDescUnion(); res.hArray = new CUarray(); res.linear = new CudaResourceDescLinear(); res.pitch2D = new CudaResourceDescPitch2D(); res.hMipmappedArray = var.CUMipmappedArray; ; }