Java Code Examples for jcuda.jcublas.JCublas2#cublasSgeam()
The following examples show how to use
jcuda.jcublas.JCublas2#cublasSgeam() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SinglePrecisionCudaSupportFunctions.java From systemds with Apache License 2.0 | 4 votes |
@Override public int cublasgeam(cublasHandle handle, int transa, int transb, int m, int n, Pointer alpha, Pointer A, int lda, Pointer beta, Pointer B, int ldb, Pointer C, int ldc) { return JCublas2.cublasSgeam(handle, transa, transb, m, n, alpha, A, lda, beta, B, ldb, C, ldc); }
Example 2
Source File: CublasUtil.java From murphy with Apache License 2.0 | 4 votes |
public Matrix comb(float alpha, float beta, Matrix that) { Matrix result = new Matrix(rows, cols); JCublas2.cublasSgeam(cublasHandle, cublasOperation.CUBLAS_OP_N, cublasOperation.CUBLAS_OP_N, rows, cols, Pointer.to(new float[] {alpha}), data_d, rows, Pointer.to(new float[] {beta}), that.data_d, that.rows, result.data_d, result.rows); if (DEBUG_SYNC) JCudaDriver.cuCtxSynchronize(); return result; }
Example 3
Source File: CublasUtil.java From murphy with Apache License 2.0 | 4 votes |
public Matrix transpose() { Matrix result = new Matrix(cols, rows); JCublas2.cublasSgeam(cublasHandle, cublasOperation.CUBLAS_OP_T, cublasOperation.CUBLAS_OP_T, cols, rows, Pointer.to(new float[] {1.0f}), data_d, rows, Pointer.to(new float[] {0.0f}), new Pointer(), rows, result.data_d, result.rows); if (DEBUG_SYNC) JCudaDriver.cuCtxSynchronize(); return result; }
Example 4
Source File: CublasUtil.java From murphy with Apache License 2.0 | 4 votes |
public Matrix zeroi() { JCublas2.cublasSgeam(cublasHandle, cublasOperation.CUBLAS_OP_N, cublasOperation.CUBLAS_OP_N, rows, cols, Pointer.to(new float[] {0.0f}), new Pointer(), rows, Pointer.to(new float[] {0.0f}), new Pointer(), rows, data_d, rows); if (DEBUG_SYNC) JCudaDriver.cuCtxSynchronize(); return this; }
Example 5
Source File: SinglePrecisionCudaSupportFunctions.java From systemds with Apache License 2.0 | 4 votes |
@Override public int cublasgeam(cublasHandle handle, int transa, int transb, int m, int n, Pointer alpha, Pointer A, int lda, Pointer beta, Pointer B, int ldb, Pointer C, int ldc) { return JCublas2.cublasSgeam(handle, transa, transb, m, n, alpha, A, lda, beta, B, ldb, C, ldc); }