Class LibTensorReorg

java.lang.Object
org.apache.sysds.runtime.data.LibTensorReorg

public class LibTensorReorg extends Object
  • Method Details

    • reshape

      public static BasicTensorBlock reshape(BasicTensorBlock in, BasicTensorBlock out, int[] dims)
      CP reshape operation (single input, single output tensor)
      Parameters:
      in - input tensor
      out - output tensor
      dims - 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 block
      mcIn - input tensor characteristics
      mcOut - output tensor characteristics
      rowwise - if true, reshape by row
      outputEmptyBlocks - output blocks with nnz=0
      Returns:
      list of indexed tensor block