All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jnt.scimark2.SOR Maven / Gradle / Ivy

Go to download

SciMark 2.0 is a Java benchmark for scientific and numerical computing. It measures several computational kernels and reports a composite score in approximate Mflops (Millions of floating point operations per second).

The newest version!
package jnt.scimark2;

public class SOR
{
	public static final double num_flops(int M, int N, int num_iterations)
	{
		double Md = (double) M;
		double Nd = (double) N;
		double num_iterD = (double) num_iterations;

		return (Md-1)*(Nd-1)*num_iterD*6.0;
	}

	public static final void execute(double omega, double G[][], int 
			num_iterations)
	{
		int M = G.length;
		int N = G[0].length;

		double omega_over_four = omega * 0.25;
		double one_minus_omega = 1.0 - omega;

		// update interior points
		//
		int Mm1 = M-1;
		int Nm1 = N-1; 
		for (int p=0; p




© 2015 - 2024 Weber Informatics LLC | Privacy Policy