示例#1
0
		/// <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;
		}
示例#2
0
		/// <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;
		}
示例#3
0
		/// <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;
		}
示例#4
0
		/// <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; ;
		}