 #define TIMESTEPS 200
 #define CHANNELS 1
 
-__global__ void addBaselineToGrid(
-    double scale
-  , int max_supp
-  , Double4c grid[GRID_SIZE][GRID_SIZE]
-  , const complexd * gcf_layers[WPLANES]
-  , const double3 uvw[TIMESTEPS]
-  , const Double4c vis[TIMESTEPS]
-  ) {
-  addBaselineToGrid<OVER, WPLANES, GRID_SIZE, TIMESTEPS, CHANNELS>
-    ( scale
-    , max_supp
-    , grid
-    , gcf_layers
-    , uvw
-    , vis
-    );
-}
-
-__global__ void addBaselinesToGridSkaMid(
-    double scale
-  , 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
-    , gcf_layers
-    , uvw
-    , vis
-    );
-}
-
-__global__ void addBaselinesToGridSkaMidWithUsingPermutations(
-    double scale
-  , 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, true>
-    ( scale
-    , permutations
-    , grid
-    , gcf_layers
-    , uvw
-    , vis
-    );
-}
+#define addBaselineToGrid(suff, ishalf)                                    \
+__global__ void addBaselineToGrid##suff(                                   \
+    double scale                                                           \
+  , int max_supp                                                           \
+  , Double4c grid[GRID_SIZE][GRID_SIZE]                                    \
+  , const complexd * gcf_layers[WPLANES]                                   \
+  , const double3 uvw[TIMESTEPS]                                           \
+  , const Double4c vis[TIMESTEPS]                                          \
+  ) {                                                                      \
+  addBaselineToGrid<OVER, WPLANES, GRID_SIZE, TIMESTEPS, CHANNELS, ishalf> \
+    ( scale                                                                \
+    , max_supp                                                             \
+    , grid                                                                 \
+    , gcf_layers                                                           \
+    , uvw                                                                  \
+    , vis                                                                  \
+    );                                                                     \
+}
+addBaselineToGrid(HalfGCF, true)
+addBaselineToGrid(FullGCF, false)
+
+#define addBaselinesToGridSkaMid(suff, ishalf)                                                \
+__global__ void addBaselinesToGridSkaMid##suff(                                               \
+    double scale                                                                              \
+  , 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, ishalf, false> \
+    ( scale                                                                                   \
+    , permutations                                                                            \
+    , grid                                                                                    \
+    , gcf_layers                                                                              \
+    , uvw                                                                                     \
+    , vis                                                                                     \
+    );                                                                                        \
+}
+addBaselinesToGridSkaMid(HalfGCF, true)
+addBaselinesToGridSkaMid(FullGCF, false)
+
+#define addBaselinesToGridSkaMidUsingPermutations(suff, ishalf)                              \
+__global__ void addBaselinesToGridSkaMidUsingPermutations##suff(                             \
+    double scale                                                                             \
+  , 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, ishalf, true> \
+    ( scale                                                                                  \
+    , permutations                                                                           \
+    , grid                                                                                   \
+    , gcf_layers                                                                             \
+    , uvw                                                                                    \
+    , vis                                                                                    \
+    );                                                                                       \
+}
+addBaselinesToGridSkaMidUsingPermutations(HalfGCF, true)
+addBaselinesToGridSkaMidUsingPermutations(FullGCF, false)
 
 __global__ void  extractPolarization(
     int pol


    , timesteps
    , channels
    > (max_supp, gcf_layer, grid, uvo_shared, vis, myU, myV);
  }
}


  , int timesteps
  , int channels
  , bool is_half_gcf
  >
__device__ __inline__ void addBaselineToGrid(
    double scale
