 
 __global__ void addBaselinesToGridSkaMid(
     double scale
-  , const BlWMap permutations[32131]
-  , Double4c grid[4096][4096]
-  , const complexd * gcf_layers[65]
-  , const double3 uvw[32131][200]
-  , const Double4c vis[32131][200]
-  ) {
-  addBaselinesToGrid<8, 65, 4096, 32131, 200, 1, false>
+  , const BlWMap permutations[BASELINES]
+  , Double4c grid[GRID_SIZE][GRID_SIZE]
+  , const complexd * gcf_layers[WPLANES]
+  , const double3 uvw[BASELINES][TIMESTEPS]
+  , const Double4c vis[BASELINES][TIMESTEPS]
+  ) {
+  addBaselinesToGrid<OVER, WPLANES, GRID_SIZE, BASELINES, TIMESTEPS, CHANNELS, false>
     ( scale
     , permutations
     , grid


__global__ void addBaselinesToGridSkaMidWithUsingPermutations(
    double scale
  , const BlWMap permutations[32131]
  , Double4c grid[4096][4096]
  , const complexd * gcf_layers[65]
  , const double3 uvw[32131][200]
  , const Double4c vis[32131][200]
  ) {
  addBaselinesToGrid<8, 65, 4096, 32131, 200, 1, true>
    ( scale
    , permutations
    , grid


__global__ void  extractPolarization(
    int pol
  , complexd dst_grid[GRID_SIZE][GRID_SIZE]
  , const complexd src_grid[GRID_SIZE][GRID_SIZE][4]
  )
{
  const int
