public class LibMatrixReorg extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
ALLOW_BLOCK_REUSE |
static long |
PAR_NUMCELL_THRESHOLD |
static boolean |
SHALLOW_DENSE_ROWWISE_RESHAPE |
static boolean |
SHALLOW_DENSE_VECTOR_TRANSPOSE |
Modifier and Type | Method and Description |
---|---|
static MatrixBlock |
diag(MatrixBlock in,
MatrixBlock out) |
static boolean |
isSupportedReorgOperator(org.apache.sysml.runtime.matrix.operators.ReorgOperator op) |
static MatrixBlock |
reorg(MatrixBlock in,
MatrixBlock out,
org.apache.sysml.runtime.matrix.operators.ReorgOperator op) |
static ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> |
reshape(org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue in,
long rows1,
long cols1,
int brlen1,
int bclen1,
ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> out,
long rows2,
long cols2,
int brlen2,
int bclen2,
boolean rowwise)
MR reshape interface - for reshape we cannot view blocks independently, and hence,
there are different CP and MR interfaces.
|
static MatrixBlock |
reshape(MatrixBlock in,
MatrixBlock out,
int rows,
int cols,
boolean rowwise)
CP reshape operation (single input, single output matrix)
|
static void |
rev(org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue in,
long rlen,
int brlen,
ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> out) |
static MatrixBlock |
rev(MatrixBlock in,
MatrixBlock out) |
static void |
rexpand(org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue data,
double max,
boolean rows,
boolean cast,
boolean ignore,
long brlen,
long bclen,
ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> outList)
MR/Spark rexpand operation (single input, multiple outputs incl empty blocks)
|
static MatrixBlock |
rexpand(MatrixBlock in,
MatrixBlock ret,
double max,
boolean rows,
boolean cast,
boolean ignore)
CP rexpand operation (single input, single output)
|
static void |
rmempty(org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue data,
org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue offset,
boolean rmRows,
long len,
long brlen,
long bclen,
ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> outList)
MR rmempty interface - for rmempty we cannot view blocks independently, and hence,
there are different CP and MR interfaces.
|
static MatrixBlock |
rmempty(MatrixBlock in,
MatrixBlock ret,
boolean rows,
MatrixBlock select)
CP rmempty operation (single input, single output matrix)
|
static MatrixBlock |
sort(MatrixBlock in,
MatrixBlock out,
int by,
boolean desc,
boolean ixret) |
static MatrixBlock |
transpose(MatrixBlock in,
MatrixBlock out) |
static MatrixBlock |
transpose(MatrixBlock in,
MatrixBlock out,
int k) |
public static final long PAR_NUMCELL_THRESHOLD
public static final boolean SHALLOW_DENSE_VECTOR_TRANSPOSE
public static final boolean SHALLOW_DENSE_ROWWISE_RESHAPE
public static final boolean ALLOW_BLOCK_REUSE
public static boolean isSupportedReorgOperator(org.apache.sysml.runtime.matrix.operators.ReorgOperator op)
public static MatrixBlock reorg(MatrixBlock in, MatrixBlock out, org.apache.sysml.runtime.matrix.operators.ReorgOperator op) throws DMLRuntimeException
DMLRuntimeException
public static MatrixBlock transpose(MatrixBlock in, MatrixBlock out) throws DMLRuntimeException
DMLRuntimeException
public static MatrixBlock transpose(MatrixBlock in, MatrixBlock out, int k) throws DMLRuntimeException
DMLRuntimeException
public static MatrixBlock rev(MatrixBlock in, MatrixBlock out) throws DMLRuntimeException
DMLRuntimeException
public static void rev(org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue in, long rlen, int brlen, ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> out) throws DMLRuntimeException
DMLRuntimeException
public static MatrixBlock diag(MatrixBlock in, MatrixBlock out) throws DMLRuntimeException
DMLRuntimeException
public static MatrixBlock sort(MatrixBlock in, MatrixBlock out, int by, boolean desc, boolean ixret) throws DMLRuntimeException
DMLRuntimeException
public static MatrixBlock reshape(MatrixBlock in, MatrixBlock out, int rows, int cols, boolean rowwise) throws DMLRuntimeException
in
- input matrixout
- output matrixrows
- number of rowscols
- number of columnsrowwise
- if true, reshape by rowDMLRuntimeException
- if DMLRuntimeException occurspublic static ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> reshape(org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue in, long rows1, long cols1, int brlen1, int bclen1, ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> out, long rows2, long cols2, int brlen2, int bclen2, boolean rowwise) throws DMLRuntimeException
in
- indexed matrix valuerows1
- number of rows 1cols1
- number of columns 1brlen1
- number of rows in a block 1bclen1
- number of columns in a block 1out
- list of indexed matrix valuesrows2
- number of rows 2cols2
- number of columns 2brlen2
- number of rows in a block 2bclen2
- number of columns in a block 2rowwise
- if true, reshape by rowDMLRuntimeException
- if DMLRuntimeException occurspublic static MatrixBlock rmempty(MatrixBlock in, MatrixBlock ret, boolean rows, MatrixBlock select) throws DMLRuntimeException
in
- input matrixret
- output matrixrows
- ?select
- ?DMLRuntimeException
- if DMLRuntimeException occurspublic static void rmempty(org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue data, org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue offset, boolean rmRows, long len, long brlen, long bclen, ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> outList) throws DMLRuntimeException
data
- ?offset
- ?rmRows
- ?len
- ?brlen
- number of rows in a blockbclen
- number of columns in a blockoutList
- list of indexed matrix valuesDMLRuntimeException
- if DMLRuntimeException occurspublic static MatrixBlock rexpand(MatrixBlock in, MatrixBlock ret, double max, boolean rows, boolean cast, boolean ignore) throws DMLRuntimeException
in
- input matrixret
- output matrixmax
- ?rows
- ?cast
- ?ignore
- ?DMLRuntimeException
- if DMLRuntimeException occurspublic static void rexpand(org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue data, double max, boolean rows, boolean cast, boolean ignore, long brlen, long bclen, ArrayList<org.apache.sysml.runtime.matrix.mapred.IndexedMatrixValue> outList) throws DMLRuntimeException
data
- indexed matrix valuemax
- ?rows
- ?cast
- ?ignore
- ?brlen
- number of rows in a blockbclen
- number of columns in a blockoutList
- list of indexed matrix valuesDMLRuntimeException
- if DMLRuntimeException occursCopyright © 2017 The Apache Software Foundation. All rights reserved.