public class BlasBufferUtil extends Object
Constructor and Description |
---|
BlasBufferUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
getBlasOffset(INDArray arr)
Get blas stride for the
given array
|
static int |
getBlasStride(INDArray arr)
Get blas stride for the
given array
|
static char |
getCharForTranspose(INDArray arr)
Returns the proper character for
how to interpret a buffer (fortran being N C being T)
|
static int |
getDimension(INDArray arr,
boolean defaultRows)
Get the dimension associated with
the given ordering.
|
static double[] |
getDoubleData(DataBuffer buf)
Returns the double data
for this buffer.
|
static double[] |
getDoubleData(INDArray buf)
Returns the double data
for this ndarray.
|
static float[] |
getFloatData(DataBuffer buf)
Returns the float data
for this buffer.
|
static float[] |
getFloatData(INDArray buf)
Returns the float data
for this ndarray.
|
static int |
getLd(INDArray arr)
Get the leading dimension
for a blas invocation.
|
static int |
getStrideForOrdering(INDArray arr)
Return the proper stride
through a vector
relative to the ordering of the array
This is for incX/incY parameters in BLAS.
|
static void |
setData(double[] data,
INDArray toSet)
Set the data for the underlying array.
|
static void |
setData(float[] data,
INDArray toSet)
Set the data for the underlying array.
|
public static int getBlasOffset(INDArray arr)
arr
- the arraypublic static int getBlasStride(INDArray arr)
arr
- the arraypublic static float[] getFloatData(INDArray buf)
buf
- the ndarray to get the data forpublic static double[] getDoubleData(INDArray buf)
buf
- the ndarray to get the data forpublic static char getCharForTranspose(INDArray arr)
arr
- the array to get the transpose forpublic static int getStrideForOrdering(INDArray arr)
arr
- the array to get the stride forpublic static int getDimension(INDArray arr, boolean defaultRows)
arr
- defaultRows
- public static int getLd(INDArray arr)
arr
- the array topublic static float[] getFloatData(DataBuffer buf)
buf
- the ndarray to get the data forpublic static double[] getDoubleData(DataBuffer buf)
buf
- the ndarray to get the data forpublic static void setData(float[] data, INDArray toSet)
data
- the data to settoSet
- the array to set the data topublic static void setData(double[] data, INDArray toSet)
data
- the data to settoSet
- the array to set the data toCopyright © 2016. All Rights Reserved.