Package org.nd4j.linalg.api.blas
Interface Level1
-
- All Known Implementing Classes:
BaseLevel1
public interface Level1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
asum(long N, DataBuffer x, int offsetX, int incrX)
sum of magnitudes of all elementsdouble
asum(INDArray arr)
computes the sum of magnitudes of all vector elements or, for a complex vector x, the sumvoid
axpy(long N, double alpha, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY)
computes a vector-scalar product and adds the result to a vector.void
axpy(long N, double alpha, INDArray x, INDArray y)
computes a vector-scalar product and adds the result to a vector.void
copy(long N, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY)
copy a vector to another vector.void
copy(INDArray x, INDArray y)
copy a vector to another vector.double
dot(long N, double alpha, INDArray X, INDArray Y)
computes a vector-vector dot product.double
dot(long N, DataBuffer dx, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY)
Vector-vector dot productint
iamax(long N, DataBuffer x, int offsetX, int incrX)
Index of largest absolute valueint
iamax(long N, INDArray arr, int stride)
finds the element of a vector that has the largest absolute value.int
iamax(INDArray arr)
finds the element of a vector that has the largest absolute value.int
iamin(INDArray arr)
finds the element of a vector that has the minimum absolute value.double
nrm2(INDArray arr)
computes the Euclidean norm of a vector.void
rot(long N, INDArray X, INDArray Y, double c, double s)
performs rotation of points in the plane.void
rotg(INDArray a, INDArray b, INDArray c, INDArray s)
computes parameters for a Givens rotation.void
rotmg(INDArray d1, INDArray d2, INDArray b1, double b2, INDArray P)
computes the modified parameters for a Givens rotation.void
scal(long N, double alpha, INDArray X)
computes a vector by a scalar product.boolean
supportsDataBufferL1Ops()
Can we use the axpy and copy methods that take a DataBuffer instead of an INDArray with this backend?void
swap(INDArray x, INDArray y)
swaps a vector with another vector.
-
-
-
Method Detail
-
dot
double dot(long N, double alpha, INDArray X, INDArray Y)
computes a vector-vector dot product.- Parameters:
n
-alpha
-X
-Y
-- Returns:
-
dot
double dot(long N, DataBuffer dx, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY)
Vector-vector dot product
-
nrm2
double nrm2(INDArray arr)
computes the Euclidean norm of a vector.- Parameters:
arr
-- Returns:
-
asum
double asum(INDArray arr)
computes the sum of magnitudes of all vector elements or, for a complex vector x, the sum- Parameters:
arr
-- Returns:
-
asum
double asum(long N, DataBuffer x, int offsetX, int incrX)
sum of magnitudes of all elements
-
iamax
int iamax(INDArray arr)
finds the element of a vector that has the largest absolute value.- Parameters:
arr
-- Returns:
-
iamax
int iamax(long N, INDArray arr, int stride)
finds the element of a vector that has the largest absolute value.- Parameters:
n
- the length to iterate forarr
- the array to get the max index forstride
- the stride for the array- Returns:
-
iamax
int iamax(long N, DataBuffer x, int offsetX, int incrX)
Index of largest absolute value
-
iamin
int iamin(INDArray arr)
finds the element of a vector that has the minimum absolute value.- Parameters:
arr
-- Returns:
-
copy
void copy(long N, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY)
copy a vector to another vector.- Parameters:
x
-y
-
-
axpy
void axpy(long N, double alpha, INDArray x, INDArray y)
computes a vector-scalar product and adds the result to a vector.- Parameters:
n
-alpha
-x
-y
-
-
axpy
void axpy(long N, double alpha, DataBuffer x, int offsetX, int incrX, DataBuffer y, int offsetY, int incrY)
computes a vector-scalar product and adds the result to a vector. y = a*x + y- Parameters:
n
- number of operationsalpha
-x
- XoffsetX
- offset of first element of X in bufferincrX
- increment/stride between elements of X in buffery
- YoffsetY
- offset of first element of Y in bufferincrY
- increment/stride between elements of Y in buffer
-
rotg
void rotg(INDArray a, INDArray b, INDArray c, INDArray s)
computes parameters for a Givens rotation.- Parameters:
a
-b
-c
-s
-
-
rot
void rot(long N, INDArray X, INDArray Y, double c, double s)
performs rotation of points in the plane.- Parameters:
N
-X
-Y
-c
-s
-
-
rotmg
void rotmg(INDArray d1, INDArray d2, INDArray b1, double b2, INDArray P)
computes the modified parameters for a Givens rotation.- Parameters:
d1
-d2
-b1
-b2
-P
-
-
scal
void scal(long N, double alpha, INDArray X)
computes a vector by a scalar product.- Parameters:
N
-alpha
-X
-
-
supportsDataBufferL1Ops
boolean supportsDataBufferL1Ops()
Can we use the axpy and copy methods that take a DataBuffer instead of an INDArray with this backend?
-
-