#include "SOR.h" double SOR_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; } void SOR_execute(int M, int N, double omega, double **G, int num_iterations) { 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; int p; int i; int j; double *Gi; double *Gim1; double *Gip1; for (p=0; p