Package org.apache.sysds.runtime.data
Class LibTensorReorg
- java.lang.Object
-
- org.apache.sysds.runtime.data.LibTensorReorg
-
public class LibTensorReorg extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BasicTensorBlockreshape(BasicTensorBlock in, BasicTensorBlock out, int[] dims)CP reshape operation (single input, single output tensor)static List<IndexedTensorBlock>reshape(IndexedTensorBlock in, DataCharacteristics mcIn, DataCharacteristics mcOut, boolean rowwise, boolean outputEmptyBlocks)MR/SPARK reshape interface - for reshape we cannot view blocks independently, and hence, there are different CP and MR interfaces.
-
-
-
Method Detail
-
reshape
public static BasicTensorBlock reshape(BasicTensorBlock in, BasicTensorBlock out, int[] dims)
CP reshape operation (single input, single output tensor)- Parameters:
in- input tensorout- output tensordims- dimensions- Returns:
- output tensor
-
reshape
public static List<IndexedTensorBlock> reshape(IndexedTensorBlock in, DataCharacteristics mcIn, DataCharacteristics mcOut, boolean rowwise, boolean outputEmptyBlocks)
MR/SPARK reshape interface - for reshape we cannot view blocks independently, and hence, there are different CP and MR interfaces.- Parameters:
in- indexed tensor blockmcIn- input tensor characteristicsmcOut- output tensor characteristicsrowwise- if true, reshape by rowoutputEmptyBlocks- output blocks with nnz=0- Returns:
- list of indexed tensor block
-
-