Module tornado.api

Class StorageFormats

java.lang.Object
uk.ac.manchester.tornado.api.types.utils.StorageFormats

public final class StorageFormats extends Object
  • Method Details

    • toColumnMajor

      @Deprecated public static int toColumnMajor(int i, int j, int ld)
      Deprecated.
      Converts a given i,j index to a column-major index.
      Parameters:
      i - row index
      j - column index
      ld - length of a column
      Returns:
      int
    • toRowMajor

      public static int toRowMajor(int i, int j, int numColumns)
      Converts a given i,j index to a row-major index.
      Parameters:
      i - row index
      j - column index
      numColumns - length of a row
      Returns:
      int
    • toRowMajorVector

      public static int toRowMajorVector(int i, int j, int numColumns, int vectorElements)
    • toRowMajor3D

      public static int toRowMajor3D(int i, int j, int k, int zMax, int yMax)
    • toRowMajor3DVector

      public static int toRowMajor3DVector(int i, int j, int k, int zSize, int ySize, int vectorWidth)
    • toRowMajor

      public static int toRowMajor(int i, int j, int ld, int el)
      Converts a given i,j index to row-major index.
      Parameters:
      i - row index
      j - column index
      ld - length of a row
      el - length of each element in a row
      Returns:
      int
    • toRowMajor

      public static int toRowMajor(int i, int j, int k, int ld1, int ld2, int el)
      Converts a given i,j,k index to row-major index.
      Parameters:
      i - index in 1st dimension
      j - index in 2nd dimension
      k - index in 3rd dimension
      ld1 - leading edge length 1st dimension
      ld2 - leading edge length 2dn dimension
      el - basic element length
      Returns:
      int
    • toRowMajor

      public static int toRowMajor(int i, int j, int incm, int incn, int ld)
      Converts a given i,j index to a row-major index.
      Parameters:
      i - row index
      j - column index
      incm - row step
      incn - col step
      ld - length of a row
      Returns:
      int
    • toFortran

      public static int toFortran(int i, int j, int ld)
      Converts a given i,j index to Fortran index.
      Parameters:
      i - row index
      j - column index
      ld - length of a column
      Returns:
      int
    • toRowMajor

      public static DoubleArray toRowMajor(double[][] matrix)
      Converts a matrix stored in multidimensional arrays into Row-Major format.
      Parameters:
      matrix - input matrix
      Returns:
      double[]
    • toRowMajor

      public static FloatArray toRowMajor(float[][] matrix)
      Converts a matrix stored in multidimensional arrays into Row-Major format.
      Parameters:
      matrix - input matrix
      Returns:
      float[]
    • toRowMajor3D

      public static FloatArray toRowMajor3D(float[][][] matrix)
    • toRowMajor3D

      public static IntArray toRowMajor3D(int[][][] matrix)
    • toRowMajor3D

      public static DoubleArray toRowMajor3D(double[][][] matrix)
    • toRowMajor3D

      public static LongArray toRowMajor3D(long[][][] matrix)
    • toRowMajor3D

      public static ShortArray toRowMajor3D(short[][][] matrix)
    • toRowMajor

      public static IntArray toRowMajor(int[][] matrix)
    • toRowMajor

      public static ByteArray toRowMajor(byte[][] matrix)
      Converts a matrix stored in multidimensional arrays into Row-Major format.
      Parameters:
      matrix - input matrix
      Returns:
      byte[]