#include "lu.h"

__kernel void ssor2(__global double *g_rsd,
                    double tmp2,
                    int nx,
                    int ny,
                    int nz)
{
  int i, j, k, m;
  __global double (*rsd)[ISIZ2/2*2+1][ISIZ1/2*2+1][5];

  k = get_global_id(2) + 1;
  j = get_global_id(1) + jst;
  i = get_global_id(0) + ist;
  if (k >= (nz-1) || j >= jend || i >= iend) return;

  rsd = (__global double (*)[ISIZ2/2*2+1][ISIZ1/2*2+1][5])g_rsd;

  for (m = 0; m < 5; m++) {
    rsd[k][j][i][m] = tmp2 * rsd[k][j][i][m];
  }
}

