public static void main(String args[]) throws Exception
{
// run the benchmark
ExecutionResult r = null;
double res[] = new double[6];
Random R = new Random(Constants.RANDOM_SEED);
Stopwatch sw = new Stopwatch();
sw.start();
r = CustomKernel.measureFFT(R);
res[1] = CalculationSupport.getFFT(r.getCycles(), r.getCalculationTime());
sw.stop();
System.out.println("FFT : " + sw.read());
sw.reset();
sw.start();
r = CustomKernel.measureSOR(R);
res[2] = CalculationSupport.getSOR(r.getCycles(), r.getCalculationTime());
sw.stop();
System.out.println("SOR : " + sw.read());
sw.reset();
sw.start();
r = CustomKernel.measureMonteCarlo();
res[3] = CalculationSupport.getMonteCarlo(r.getCycles(), r.getCalculationTime());
sw.stop();
System.out.println("Monte Carlo : " + sw.read());
sw.reset();
sw.start();
r = CustomKernel.measureSparseMatmult(R);
res[4] = CalculationSupport.getSparse(r.getCycles(), r.getCalculationTime());
sw.stop();
System.out.println("Sparse : " + sw.read());
sw.reset();
sw.start();
r = CustomKernel.measureLU(R);
res[5] = CalculationSupport.getLU(r.getCycles(), r.getCalculationTime());
sw.stop();
System.out.println("LU : " + sw.read());
sw.reset();