public class IOUtils extends Object
Modifier and Type | Method and Description |
---|---|
static double |
computeRMSE(double[][][] a,
double[][][] b)
Computes root mean square error between a and b.
|
static double |
computeRMSE(double[][] a,
double[][] b)
Computes root mean square error between a and b.
|
static double |
computeRMSE(double[] a,
double[] b)
Computes root mean square error between a and b.
|
static double |
computeRMSE(double a,
double b)
Computes root mean square error between a and b.
|
static double |
computeRMSE(pl.edu.icm.jlargearrays.DoubleLargeArray a,
pl.edu.icm.jlargearrays.DoubleLargeArray b)
Computes root mean square error between a and b.
|
static double |
computeRMSE(float[][][] a,
float[][][] b)
Computes root mean square error between a and b.
|
static double |
computeRMSE(float[][] a,
float[][] b)
Computes root mean square error between a and b.
|
static double |
computeRMSE(float[] a,
float[] b)
Computes root mean square error between a and b.
|
static double |
computeRMSE(float a,
float b)
Computes root mean square error between a and b.
|
static double |
computeRMSE(pl.edu.icm.jlargearrays.FloatLargeArray a,
pl.edu.icm.jlargearrays.FloatLargeArray b)
Computes root mean square error between a and b.
|
static void |
fillMatrix_1D(long N,
double[] m)
Fills 1D matrix with random numbers.
|
static void |
fillMatrix_1D(long N,
pl.edu.icm.jlargearrays.DoubleLargeArray m)
Fills 1D matrix with random numbers.
|
static void |
fillMatrix_1D(long N,
float[] m)
Fills 1D matrix with random numbers.
|
static void |
fillMatrix_1D(long N,
pl.edu.icm.jlargearrays.FloatLargeArray m)
Fills 1D matrix with random numbers.
|
static void |
fillMatrix_2D(long n1,
long n2,
double[] m)
Fills 2D matrix with random numbers.
|
static void |
fillMatrix_2D(long n1,
long n2,
double[][] m)
Fills 2D matrix with random numbers.
|
static void |
fillMatrix_2D(long n1,
long n2,
pl.edu.icm.jlargearrays.DoubleLargeArray m)
Fills 2D matrix with random numbers.
|
static void |
fillMatrix_2D(long n1,
long n2,
float[] m)
Fills 2D matrix with random numbers.
|
static void |
fillMatrix_2D(long n1,
long n2,
float[][] m)
Fills 2D matrix with random numbers.
|
static void |
fillMatrix_2D(long n1,
long n2,
pl.edu.icm.jlargearrays.FloatLargeArray m)
Fills 2D matrix with random numbers.
|
static void |
fillMatrix_3D(long n1,
long n2,
long n3,
double[] m)
Fills 3D matrix with random numbers.
|
static void |
fillMatrix_3D(long n1,
long n2,
long n3,
double[][][] m)
Fills 3D matrix with random numbers.
|
static void |
fillMatrix_3D(long n1,
long n2,
long n3,
pl.edu.icm.jlargearrays.DoubleLargeArray m)
Fills 3D matrix with random numbers.
|
static void |
fillMatrix_3D(long n1,
long n2,
long n3,
float[] m)
Fills 3D matrix with random numbers.
|
static void |
fillMatrix_3D(long n1,
long n2,
long n3,
float[][][] m)
Fills 3D matrix with random numbers.
|
static void |
fillMatrix_3D(long n1,
long n2,
long n3,
pl.edu.icm.jlargearrays.FloatLargeArray m)
Fills 3D matrix with random numbers.
|
static void |
showComplex_1D(double[] x,
String title)
Displays elements of
x , assuming that it is 1D complex
array. |
static void |
showComplex_2D(double[][] x,
String title)
Displays elements of
x , assuming that it is 2D complex
array. |
static void |
showComplex_2D(int rows,
int columns,
double[] x,
String title)
Displays elements of
x , assuming that it is 2D complex
array. |
static void |
showComplex_3D(double[][][] x,
String title)
Displays elements of
x . |
static void |
showComplex_3D(int n1,
int n2,
int n3,
double[] x,
String title)
Displays elements of
x , assuming that it is 3D complex
array. |
static void |
showComplex_3D(int n1,
int n2,
int n3,
float[] x,
String title)
Displays elements of
x , assuming that it is 3D complex
array. |
static void |
showReal_1D(double[] x,
String title)
Displays elements of
x , assuming that it is 1D real array. |
static void |
showReal_2D(int n1,
int n2,
double[] x,
String title)
Displays elements of
x , assuming that it is 2D real array. |
static void |
showReal_3D(double[][][] x,
String title)
Displays elements of
x . |
static void |
showReal_3D(int n1,
int n2,
int n3,
double[] x,
String title)
Displays elements of
x , assuming that it is 3D real array. |
static void |
writeFFTBenchmarkResultsToFile(String filename,
int nthread,
int niter,
boolean doWarmup,
boolean doScaling,
long[] sizes,
double[] times_without_constructor,
double[] times_with_constructor)
Saves benchmark results in a file.
|
static void |
writeToFileComplex_1D(double[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 1D complex array. |
static void |
writeToFileComplex_1D(float[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 1D complex array. |
static void |
writeToFileComplex_2D(double[][] x,
String filename)
Saves elements of
x in a file filename . |
static void |
writeToFileComplex_2D(int n1,
int n2,
double[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 2D complex array. |
static void |
writeToFileComplex_2D(int n1,
int n2,
float[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 2D complex array. |
static void |
writeToFileComplex_3D(double[][][] x,
String filename)
Saves elements of
x in a file filename . |
static void |
writeToFileComplex_3D(int n1,
int n2,
int n3,
double[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 3D complex array. |
static void |
writeToFileReal_1D(double[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 2D real array. |
static void |
writeToFileReal_1D(float[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 2D real array. |
static void |
writeToFileReal_2D(int n1,
int n2,
double[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 2D real array. |
static void |
writeToFileReal_2D(int n1,
int n2,
float[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 2D real array. |
static void |
writeToFileReal_3D(int n1,
int n2,
int n3,
double[] x,
String filename)
Saves elements of
x in a file filename ,
assuming that it is 3D real array. |
public static double computeRMSE(float a, float b)
a
- input parameterb
- input parameterpublic static double computeRMSE(float[] a, float[] b)
a
- input parameterb
- input parameterpublic static double computeRMSE(pl.edu.icm.jlargearrays.FloatLargeArray a, pl.edu.icm.jlargearrays.FloatLargeArray b)
a
- input parameterb
- input parameterpublic static double computeRMSE(float[][] a, float[][] b)
a
- input parameterb
- input parameterpublic static double computeRMSE(float[][][] a, float[][][] b)
a
- input parameterb
- input parameterpublic static double computeRMSE(double a, double b)
a
- input parameterb
- input parameterpublic static double computeRMSE(double[] a, double[] b)
a
- input parameterb
- input parameterpublic static double computeRMSE(pl.edu.icm.jlargearrays.DoubleLargeArray a, pl.edu.icm.jlargearrays.DoubleLargeArray b)
a
- input parameterb
- input parameterpublic static double computeRMSE(double[][] a, double[][] b)
a
- input parameterb
- input parameterpublic static double computeRMSE(double[][][] a, double[][][] b)
a
- input parameterb
- input parameterpublic static void fillMatrix_1D(long N, double[] m)
N
- sizem
- 1D matrixpublic static void fillMatrix_1D(long N, pl.edu.icm.jlargearrays.DoubleLargeArray m)
N
- sizem
- 1D matrixpublic static void fillMatrix_1D(long N, pl.edu.icm.jlargearrays.FloatLargeArray m)
N
- sizem
- 1D matrixpublic static void fillMatrix_1D(long N, float[] m)
N
- sizem
- 1D matrixpublic static void fillMatrix_2D(long n1, long n2, double[] m)
n1
- rowsn2
- columnsm
- 2D matrixpublic static void fillMatrix_2D(long n1, long n2, pl.edu.icm.jlargearrays.FloatLargeArray m)
n1
- rowsn2
- columnsm
- 2D matrixpublic static void fillMatrix_2D(long n1, long n2, pl.edu.icm.jlargearrays.DoubleLargeArray m)
n1
- rowsn2
- columnsm
- 2D matrixpublic static void fillMatrix_2D(long n1, long n2, float[] m)
n1
- rowsn2
- columnsm
- 2D matrixpublic static void fillMatrix_2D(long n1, long n2, double[][] m)
n1
- rowsn2
- columnsm
- 2D matrixpublic static void fillMatrix_2D(long n1, long n2, float[][] m)
n1
- rowsn2
- columnsm
- 2D matrixpublic static void fillMatrix_3D(long n1, long n2, long n3, double[] m)
n1
- slicesn2
- rowsn3
- columnsm
- 3D matrixpublic static void fillMatrix_3D(long n1, long n2, long n3, pl.edu.icm.jlargearrays.DoubleLargeArray m)
n1
- slicesn2
- rowsn3
- columnsm
- 3D matrixpublic static void fillMatrix_3D(long n1, long n2, long n3, pl.edu.icm.jlargearrays.FloatLargeArray m)
n1
- slicesn2
- rowsn3
- columnsm
- 3D matrixpublic static void fillMatrix_3D(long n1, long n2, long n3, float[] m)
n1
- slicesn2
- rowsn3
- columnsm
- 3D matrixpublic static void fillMatrix_3D(long n1, long n2, long n3, double[][][] m)
n1
- slicesn2
- rowsn3
- columnsm
- 3D matrixpublic static void fillMatrix_3D(long n1, long n2, long n3, float[][][] m)
n1
- slicesn2
- rowsn3
- columnsm
- 3D matrixpublic static void showComplex_1D(double[] x, String title)
x
, assuming that it is 1D complex
array. Complex data is represented by 2 double values in sequence: the
real and imaginary parts.x
- input arraytitle
- title of the arraypublic static void showComplex_2D(int rows, int columns, double[] x, String title)
x
, assuming that it is 2D complex
array. Complex data is represented by 2 double values in sequence: the
real and imaginary parts.rows
- number of rows in the input arraycolumns
- number of columns in the input arrayx
- input arraytitle
- title of the arraypublic static void showComplex_2D(double[][] x, String title)
x
, assuming that it is 2D complex
array. Complex data is represented by 2 double values in sequence: the
real and imaginary parts.x
- input arraytitle
- title of the arraypublic static void showComplex_3D(int n1, int n2, int n3, double[] x, String title)
x
, assuming that it is 3D complex
array. Complex data is represented by 2 double values in sequence: the
real and imaginary parts.n1
- first dimensionn2
- second dimensionn3
- third dimensionx
- input arraytitle
- title of the arraypublic static void showComplex_3D(double[][][] x, String title)
x
. Complex data is represented by 2
double values in sequence: the real and imaginary parts.x
- input arraytitle
- title of the arraypublic static void showComplex_3D(int n1, int n2, int n3, float[] x, String title)
x
, assuming that it is 3D complex
array. Complex data is represented by 2 double values in sequence: the
real and imaginary parts.n1
- first dimensionn2
- second dimensionn3
- third dimensionx
- input arraytitle
- title of the arraypublic static void showReal_1D(double[] x, String title)
x
, assuming that it is 1D real array.x
- input arraytitle
- title of the arraypublic static void showReal_2D(int n1, int n2, double[] x, String title)
x
, assuming that it is 2D real array.n1
- first dimensionn2
- second dimensionx
- input arraytitle
- title of the arraypublic static void showReal_3D(int n1, int n2, int n3, double[] x, String title)
x
, assuming that it is 3D real array.n1
- first dimensionn2
- second dimensionn3
- third dimensionx
- input arraytitle
- title of the arraypublic static void showReal_3D(double[][][] x, String title)
x
.x
- input arraytitle
- title of the arraypublic static void writeToFileComplex_1D(double[] x, String filename)
x
in a file filename
,
assuming that it is 1D complex array. Complex data is represented by 2
double values in sequence: the real and imaginary parts.x
- input arrayfilename
- finenamepublic static void writeToFileComplex_1D(float[] x, String filename)
x
in a file filename
,
assuming that it is 1D complex array. Complex data is represented by 2
double values in sequence: the real and imaginary parts.x
- input arrayfilename
- finenamepublic static void writeToFileComplex_2D(int n1, int n2, double[] x, String filename)
x
in a file filename
,
assuming that it is 2D complex array. Complex data is represented by 2
double values in sequence: the real and imaginary parts.n1
- first dimensionn2
- second dimensionx
- input arrayfilename
- finenamepublic static void writeToFileComplex_2D(int n1, int n2, float[] x, String filename)
x
in a file filename
,
assuming that it is 2D complex array. Complex data is represented by 2
double values in sequence: the real and imaginary parts.n1
- first dimensionn2
- second dimensionx
- input arrayfilename
- finenamepublic static void writeToFileComplex_2D(double[][] x, String filename)
x
in a file filename
. Complex
data is represented by 2 double values in sequence: the real and
imaginary parts.x
- input arrayfilename
- finenamepublic static void writeToFileComplex_3D(int n1, int n2, int n3, double[] x, String filename)
x
in a file filename
,
assuming that it is 3D complex array. Complex data is represented by 2
double values in sequence: the real and imaginary parts.n1
- first dimensionn2
- second dimensionn3
- third dimensionx
- input arrayfilename
- finenamepublic static void writeToFileComplex_3D(double[][][] x, String filename)
x
in a file filename
. Complex
data is represented by 2 double values in sequence: the real and
imaginary parts.x
- input arrayfilename
- finenamepublic static void writeToFileReal_1D(double[] x, String filename)
x
in a file filename
,
assuming that it is 2D real array.x
- input arrayfilename
- finenamepublic static void writeToFileReal_1D(float[] x, String filename)
x
in a file filename
,
assuming that it is 2D real array.x
- input arrayfilename
- finenamepublic static void writeToFileReal_2D(int n1, int n2, double[] x, String filename)
x
in a file filename
,
assuming that it is 2D real array.n1
- first dimensionn2
- second dimensionx
- input arrayfilename
- finenamepublic static void writeToFileReal_2D(int n1, int n2, float[] x, String filename)
x
in a file filename
,
assuming that it is 2D real array.n1
- first dimensionn2
- second dimensionx
- input arrayfilename
- finenamepublic static void writeToFileReal_3D(int n1, int n2, int n3, double[] x, String filename)
x
in a file filename
,
assuming that it is 3D real array.n1
- first dimensionn2
- second dimensionn3
- third dimensionx
- input arrayfilename
- finenamepublic static void writeFFTBenchmarkResultsToFile(String filename, int nthread, int niter, boolean doWarmup, boolean doScaling, long[] sizes, double[] times_without_constructor, double[] times_with_constructor)
filename
- filenamenthread
- number of threadsniter
- number of iterationsdoWarmup
- if warmup was performeddoScaling
- if scaling was performedsizes
- benchmarked sizestimes_without_constructor
- timings excluding constructortimes_with_constructor
- timings including constructorCopyright © 2015. All rights reserved.