Class DataGen

java.lang.Object
org.apache.sysds.lops.Lop
org.apache.sysds.lops.DataGen

public class DataGen extends Lop

Defines a LOP that generates data.

  • Field Details

  • Constructor Details

    • DataGen

      public DataGen(Types.OpOpDG op, DataIdentifier id, HashMap<String,Lop> inputParametersLops, String baseDir, Types.DataType dt, Types.ValueType vt, Types.ExecType et)

      Creates a new Rand-LOP. The target identifier has to hold the dimensions of the new random object.

      Parameters:
      op - data gen method
      id - target identifier
      inputParametersLops - Lops of input parameters
      baseDir - base dir for runtime
      dt - Data type
      vt - Value type
      et - Execution type
  • Method Details

    • getDataGenMethod

      public Types.OpOpDG getDataGenMethod()
    • init

      public void init(DataIdentifier id, String baseDir, Types.ExecType et)
    • getInstructions

      public String getInstructions(String output)
      Function to generate CP/SP instructions for data generation via Rand and Seq. Since DataGen Lop can have many inputs, ONLY the output variable name is passed from piggybacking as the function argument output.
      Overrides:
      getInstructions in class Lop
      Parameters:
      output - output
      Returns:
      instructions as string
    • toString

      public String toString()
      Description copied from class: Lop
      Method to have Lops print their state. This is for debugging purposes.
      Specified by:
      toString in class Lop
    • setNumThreads

      public void setNumThreads(int k)