public final class JCUDAMatrixUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static boolean |
CUBLAS2_AVAILABLE |
static boolean |
EXCEPTIONS_ENABLED |
| Constructor and Description |
|---|
JCUDAMatrixUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
freePointer(jcuda.Pointer p)
Frees the given pointer.
|
static de.jungblut.math.dense.DenseDoubleMatrix |
getMatrix(jcuda.Pointer src,
int rows,
int columns)
Read a matrix from device memory.
|
static void |
main(String[] args) |
static jcuda.Pointer |
memcpyMatrix(de.jungblut.math.dense.DenseDoubleMatrix a)
Copies the given matrix to the device memory in column major format.
|
static de.jungblut.math.dense.DenseDoubleMatrix |
multiply(de.jungblut.math.dense.DenseDoubleMatrix a,
de.jungblut.math.dense.DenseDoubleMatrix b)
Multiplies matrix A with matrix B and returns a new matrix.
|
static de.jungblut.math.dense.DenseDoubleMatrix |
multiply(de.jungblut.math.dense.DenseDoubleMatrix a,
de.jungblut.math.dense.DenseDoubleMatrix b,
boolean transposeA,
boolean transposeB)
Multiplies matrix a with matrix b and returns a new matrix.
|
static de.jungblut.math.dense.DenseDoubleMatrix |
multiply(jcuda.Pointer a,
jcuda.Pointer b,
MatrixDimension dim)
Multiplies matrix A with matrix B (these are pointers, thus the dimension
must be passed and returns a new matrix.
|
public static boolean EXCEPTIONS_ENABLED
public static boolean CUBLAS2_AVAILABLE
public static de.jungblut.math.dense.DenseDoubleMatrix multiply(de.jungblut.math.dense.DenseDoubleMatrix a,
de.jungblut.math.dense.DenseDoubleMatrix b)
public static de.jungblut.math.dense.DenseDoubleMatrix multiply(jcuda.Pointer a,
jcuda.Pointer b,
MatrixDimension dim)
public static de.jungblut.math.dense.DenseDoubleMatrix multiply(de.jungblut.math.dense.DenseDoubleMatrix a,
de.jungblut.math.dense.DenseDoubleMatrix b,
boolean transposeA,
boolean transposeB)
public static jcuda.Pointer memcpyMatrix(de.jungblut.math.dense.DenseDoubleMatrix a)
public static de.jungblut.math.dense.DenseDoubleMatrix getMatrix(jcuda.Pointer src,
int rows,
int columns)
src - the head pointer to the matrix.rows - the number of rows.columns - the number of columnspublic static void freePointer(jcuda.Pointer p)
p - the pointer to freepublic static void main(String[] args)
Copyright © 2016. All rights reserved.