Esempio n. 1
0
		/// <summary>
		/// Create new dense solve instance
		/// </summary>
        public CudaSolveDense()
        {
			_handle = new cusolverDnHandle();
			res = CudaSolveNativeMethods.Dense.cusolverDnCreate(ref _handle);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusolverDnDestroy", res));
			if (res != cusolverStatus.Success) throw new CudaSolveException(res);
        }
			public static extern cusolverStatus cusolverDnDsytrd(cusolverDnHandle handle, char uplo, int n, CUdeviceptr A, int lda, CUdeviceptr D, CUdeviceptr E, CUdeviceptr tau, CUdeviceptr Work, int Lwork, CUdeviceptr info);
			public static extern cusolverStatus cusolverDnZgebrd(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr D, CUdeviceptr E, CUdeviceptr TAUQ, CUdeviceptr TAUP, CUdeviceptr Work, int Lwork, CUdeviceptr devInfo);
			public static extern cusolverStatus cusolverDnSetStream(cusolverDnHandle handle, CUstream streamId);
			public static extern cusolverStatus cusolverDnZgeqrf_bufferSize(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, ref int Lwork);
			public static extern cusolverStatus cusolverDnZunmqr(cusolverDnHandle handle, SideMode side, Operation trans, int m, int n, int k, CUdeviceptr A, int lda, CUdeviceptr tau, CUdeviceptr C, int ldc, CUdeviceptr work, int lwork, CUdeviceptr devInfo);
			public static extern cusolverStatus cusolverDnZsytrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr ipiv, CUdeviceptr work, int lwork, CUdeviceptr devInfo);
			public static extern cusolverStatus cusolverDnSpotrf_bufferSize(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, ref int Lwork);
			public static extern cusolverStatus cusolverDnZgeqrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr TAU, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo);
			public static extern cusolverStatus cusolverDnZgetrs(cusolverDnHandle handle, Operation trans, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr devIpiv, CUdeviceptr B, int ldb, CUdeviceptr devInfo);
			public static extern cusolverStatus cusolverDnZlaswp(cusolverDnHandle handle, int n, CUdeviceptr A, int lda, int k1, int k2, CUdeviceptr devIpiv, int incx);
			public static extern cusolverStatus cusolverDnCgetrf(cusolverDnHandle handle, int m, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, CUdeviceptr devIpiv, CUdeviceptr devInfo);
			public static extern cusolverStatus cusolverDnZpotrs(cusolverDnHandle handle, FillMode uplo, int n, int nrhs, CUdeviceptr A, int lda, CUdeviceptr B, int ldb, CUdeviceptr devInfo);
			public static extern cusolverStatus cusolverDnZpotrf(cusolverDnHandle handle, FillMode uplo, int n, CUdeviceptr A, int lda, CUdeviceptr Workspace, int Lwork, CUdeviceptr devInfo);
			public static extern cusolverStatus cusolverDnGetStream(cusolverDnHandle handle, ref CUstream sreamId);
			public static extern cusolverStatus cusolverDnZgesvd_bufferSize(cusolverDnHandle handle, int m, int n, ref int Lwork);
			public static extern cusolverStatus cusolverDnCreate(ref cusolverDnHandle handle);
			public static extern cusolverStatus cusolverDnCgesvd(cusolverDnHandle handle, [MarshalAs(UnmanagedType.I1)] char jobu, [MarshalAs(UnmanagedType.I1)] char jobvt, int m, int n, CUdeviceptr A, int lda, CUdeviceptr S, CUdeviceptr U, int ldu, CUdeviceptr VT, int ldvt, CUdeviceptr Work, int Lwork, CUdeviceptr rwork, CUdeviceptr devInfo);
			public static extern cusolverStatus cusolverDnDestroy(cusolverDnHandle handle);