Пример #1
0
		/// <summary>
		/// Creates a texture object and returns it in pTexObject. pResDesc describes the data to texture from. pTexDesc
		/// describes how the data should be sampled.
		/// </summary>
		/// <param name="resDesc">CudaResourceDesc</param>
		/// <param name="texDesc">CudaTextureDescriptor</param>
		public CudaTexObject(CudaResourceDesc resDesc, CudaTextureDescriptor texDesc)
		{
			_resDesc = resDesc;
			_texDesc = texDesc;

			_texObject = new CUtexObject();
			res = DriverAPINativeMethods.TextureObjects.cuTexObjectCreate(ref _texObject, ref _resDesc, ref _texDesc, IntPtr.Zero);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuTexObjectCreate", res));
			if (res != CUResult.Success) throw new CudaException(res);


		}
Пример #2
0
			public static extern CUResult cuTexObjectGetResourceViewDesc(ref CudaResourceViewDesc pResViewDesc, CUtexObject texObject);
Пример #3
0
			public static extern CUResult cuTexObjectGetTextureDesc(ref CudaTextureDescriptor pTexDesc, CUtexObject texObject);
Пример #4
0
			public static extern CUResult cuTexObjectDestroy(CUtexObject texObject);
Пример #5
0
			public static extern CUResult cuTexObjectCreate(ref CUtexObject pTexObject, ref CudaResourceDesc pResDesc, ref CudaTextureDescriptor pTexDesc, IntPtr pResViewDesc);