Пример #1
0
		/// <summary>
		/// Creates a surface object. <c>ResDesc</c> describes
		/// the data to perform surface load/stores on. <c>ResDesc.resType</c> must be 
		/// <see cref="CUResourceType.Array"/> and  <c>ResDesc.hArray</c>
		/// must be set to a valid CUDA array handle.
		/// </summary>
		/// <param name="array">CudaArray1D</param>
		public CudaSurfObject(CudaArray1D array)
		{
			_resDesc = new CudaResourceDesc(array);

			_surfObject = new CUsurfObject();
			res = DriverAPINativeMethods.SurfaceObjects.cuSurfObjectCreate(ref _surfObject, ref _resDesc);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuSurfObjectCreate", res));
			if (res != CUResult.Success) throw new CudaException(res);
		}
Пример #2
0
			public static extern CUResult cuSurfObjectGetResourceDesc(ref CudaResourceDesc pResDesc, CUsurfObject surfObject);
Пример #3
0
			public static extern CUResult cuSurfObjectDestroy(CUsurfObject surfObject);
Пример #4
0
			public static extern CUResult cuSurfObjectCreate(ref CUsurfObject pSurfObject, ref CudaResourceDesc pResDesc);