#include "lu.h"

double exact_scalar(int i, int j, int k, int m, __global double *g_ce);

__kernel void setbv3(__global double *g_u,
                     __global double *g_ce,
                     int nx,
                     int ny,
                     int nz)
{
  int j, k, m;

  k = get_global_id(2);
  j = get_global_id(1);
  m = get_global_id(0);  // should be [0,5)
  if (k >= nz || j >= ny) return;

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

  u[k][j][0][m] = exact_scalar( 0, j, k, m, g_ce );
  u[k][j][nx-1][m] = exact_scalar( nx-1, j, k, m, g_ce );
}

