Exemple #1
0
 public static extern CUResult cuMemcpyAtoA_v2(CUarray dstArray, SizeT dstOffset, CUarray srcArray, SizeT srcOffset, SizeT ByteCount);
Exemple #2
0
 public static extern CUResult cuMemcpyHtoAAsync_v2(CUarray dstArray, SizeT dstOffset, [In] IntPtr srcHost, SizeT ByteCount, CUstream hStream);
Exemple #3
0
 public static extern CUResult cuSurfRefGetArray( ref CUarray phArray, CUsurfref hSurfRef );
		/// <summary>
		/// Synchron copy 1D Array to host
		/// </summary>
		/// <param name="deviceArray"></param>
		public void SynchronCopyFromArray1D(CUarray deviceArray)
		{
			SynchronCopyFromArray1D(deviceArray, 0);
		}
Exemple #5
0
			public static extern CUResult cuMipmappedArrayGetLevel(ref CUarray pLevelArray, CUmipmappedArray hMipmappedArray, uint level);
Exemple #6
0
 public static extern CUResult cuTexRefGetArray( ref CUarray phArray, CUtexref hTexRef );
Exemple #7
0
 public static extern CUResult cuMemcpyHtoA_v2(CUarray dstArray, SizeT dstOffset, [In] cuDoubleComplex[] srcHost, SizeT ByteCount);
Exemple #8
0
 public static extern CUResult cuArray3DCreate_v2(ref CUarray pHandle, ref CUDAArray3DDescriptor pAllocateArray);
Exemple #9
0
 public static extern CUResult cuMemcpyDtoA_v2(CUarray dstArray, SizeT dstOffset, CUdeviceptr srcDevice, SizeT ByteCount);
Exemple #10
0
 public static extern CUResult cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, SizeT srcOffset, SizeT ByteCount);
		/// <summary>
		/// Returns a CUDA array that represents a single mipmap level
		/// of the CUDA mipmapped array.
		/// </summary>
		/// <param name="level">Mipmap level</param>
		public CUarray GetLevelAsCUArray(uint level)
		{
			CUarray array = new CUarray();

			res = DriverAPINativeMethods.ArrayManagement.cuMipmappedArrayGetLevel(ref array, _mipmappedArray, level);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMipmappedArrayGetLevel", res));
			if (res != CUResult.Success)
				throw new CudaException(res);

			return array;
		}
		/// <summary>
		/// Asynchron copy 1D Array to host
		/// </summary>
		/// <param name="deviceArray"></param>
		/// <param name="stream"></param>
		public void AsyncCopyFromArray1D(CUarray deviceArray, CUstream stream)
		{
			AsyncCopyFromArray1D(deviceArray, stream, 0);
		}
		/// <summary>
		/// Asynchron copy 1D Array to host
		/// </summary>
		/// <param name="deviceArray"></param>
		/// <param name="stream"></param>
		/// <param name="offset"></param>
		public void AsyncCopyFromArray1D(CUarray deviceArray, CUstream stream, SizeT offset)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			res = DriverAPINativeMethods.AsynchronousMemcpy_v2.cuMemcpyAtoHAsync_v2(this._intPtr, deviceArray, offset, SizeInBytes, stream);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpyAtoHAsync", res));
			if (res != CUResult.Success) throw new CudaException(res);
		}
Exemple #14
0
 public static extern CUResult cuMemcpyAtoHAsync_v2([Out] IntPtr dstHost, CUarray srcArray, SizeT srcOffset, SizeT ByteCount, CUstream hStream);
Exemple #15
0
 public static extern CUResult cuMemcpyHtoA_v2(CUarray dstArray, SizeT dstOffset, [In] cuFloatReal[] srcHost, SizeT ByteCount);
Exemple #16
0
 public static extern CUResult cuArrayDestroy( CUarray hArray );
Exemple #17
0
 public static extern CUResult cuMemcpyHtoA_v2(CUarray dstArray, SizeT dstOffset, [In] IntPtr srcHost, SizeT ByteCount);
Exemple #18
0
 public static extern CUResult cuArray3DGetDescriptor_v2(ref CUDAArray3DDescriptor pArrayDescriptor, CUarray hArray);
Exemple #19
0
 public static extern CUResult cuMemcpyAtoH_v2([Out] cuDoubleComplex[] dstHost, CUarray srcArray, SizeT srcOffset, SizeT ByteCount);
Exemple #20
0
 public static extern CUResult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, CUTexRefSetArrayFlags Flags);
Exemple #21
0
 public static extern CUResult cuMemcpyAtoH_v2([Out] cuFloatReal[] dstHost, CUarray srcArray, SizeT srcOffset, SizeT ByteCount);
Exemple #22
0
 public static extern CUResult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, CUSurfRefSetFlags Flags);
Exemple #23
0
 public static extern CUResult cuMemcpyAtoH_v2([Out] IntPtr dstHost, CUarray srcArray, SizeT srcOffset, SizeT ByteCount);
Exemple #24
0
 public static extern CUResult cuGraphicsSubResourceGetMappedArray( ref CUarray pArray, CUgraphicsResource resource, uint arrayIndex, uint mipLevel );
		/// <summary>
		/// Synchron copy host to 1D Array
		/// </summary>
		/// <param name="deviceArray"></param>
		/// <param name="offset"></param>
		public void SynchronCopyToArray1D(CUarray deviceArray, SizeT offset)
		{
			if (disposed) throw new ObjectDisposedException(this.ToString());
			res = DriverAPINativeMethods.SynchronousMemcpy_v2.cuMemcpyHtoA_v2(deviceArray, offset, this._intPtr, SizeInBytes);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cuMemcpyHtoA", res));
			if (res != CUResult.Success) throw new CudaException(res);
		}