public static int cublasSetVectorAsync (int n, int elemSize, Pointer hostPtr, int incx, Pointer devicePtr, int incy, cudaStream_t stream) { return checkResult(cublasSetVectorAsyncNative(n, elemSize, hostPtr, incx, devicePtr, incy, stream)); } /*
/** * Wrapper for CUBLAS function.<br /> * <br /> * cublasStatus * cublasAlloc (int n, int elemSize, void **devicePtr)<br /> *<br /> * creates an object in GPU memory space capable of holding an array of * n elements, where each element requires elemSize bytes of storage. If * the function call is successful, a pointer to the object in GPU memory * space is placed in devicePtr. Note that this is a device pointer that * cannot be dereferenced in host code.<br /> *<br /> * Return Values<br /> * -------------<br /> * CUBLAS_STATUS_NOT_INITIALIZED if CUBLAS library has not been initialized<br /> * CUBLAS_STATUS_INVALID_VALUE if n <= 0, or elemSize <= 0<br /> * CUBLAS_STATUS_ALLOC_FAILED if the object could not be allocated due to * lack of resources.<br /> * CUBLAS_STATUS_SUCCESS if storage was successfully allocated<br /> */ public static int cublasAlloc(int n, int elemSize, Pointer ptr) { return checkResult(cublasAllocNative(n, elemSize, ptr)); } private static native int cublasAllocNative(int n, int elemSize, Pointer ptr);
public static int cublasSetKernelStream (cudaStream_t stream) { return checkResult(cublasSetKernelStreamNative(stream)); } private static native int cublasSetKernelStreamNative(cudaStream_t stream);
public static int cublasGetMatrixAsync (int rows, int cols, int elemSize, Pointer A, int lda, Pointer B, int ldb, cudaStream_t stream) { return checkResult(cublasGetMatrixAsyncNative(rows, cols, elemSize, A, lda, B, ldb, stream)); }
cublasCcopyNative(n, x, incx, y, incy); checkResultBLAS();
cuComplex result = cublasCdotuNative(n, x, incx, y, incy); checkResultBLAS(); return result;
cuComplex result = cublasCdotcNative(n, x, incx, y, incy); checkResultBLAS(); return result;
cublasCaxpyNative(n, alpha, x, incx, y, incy); checkResultBLAS();
cublasCgemvNative(trans, m, n, alpha, A, lda, x, incx, beta, y, incy); checkResultBLAS();
cublasCgemmNative(transa, transb, m, n, k, alpha, A, lda, B, ldb, beta, C, ldc); checkResultBLAS();
cublasCgbmvNative(trans, m, n, kl, ku, alpha, A, lda, x, incx, beta, y, incy); checkResultBLAS();
public static int cublasSetMatrixAsync (int rows, int cols, int elemSize, Pointer A, int lda, Pointer B, int ldb, cudaStream_t stream) { return checkResult(cublasSetMatrixAsyncNative(rows, cols, elemSize, A, lda, B, ldb, stream)); }
public static int cublasGetVectorAsync(int n, int elemSize, Pointer devicePtr, int incx, Pointer hostPtr, int incy, cudaStream_t stream) { return checkResult(cublasGetVectorAsyncNative(n, elemSize, devicePtr, incx, hostPtr, incy, stream)); }
cublasZscalNative(n, alpha, x, incx); checkResultBLAS();
float result = cublasScnrm2Native(n, x, incx); checkResultBLAS(); return result;
int result = cublasIcamaxNative(n, x, incx); checkResultBLAS(); return result;
cublasCsscalNative(n, alpha, x, incx); checkResultBLAS();
cublasCscalNative(n, alpha, x, incx); checkResultBLAS();
int result = cublasIsaminNative(n, x, incx); checkResultBLAS(); return result;
int result = cublasIsamaxNative(n, x, incx); checkResultBLAS(); return result;