 #include "metrix.h"
 #include "OskarBinReader.h"
 
-template <int over>
-__global__ void
+template <int over, bool isbig> struct degridder {};
+
+template <int over> struct degridder<over, true>{
+
+static __device__ __inline__
 //__launch_bounds__(256, 6)
-// double2 is for 'in'
-degrid_kernel(complexd* out, const double3* in, size_t npts, const complexd* img, 
+// double2 is enough for 'in'
+void degrid_kernel(complexd* out, const double3* in, size_t npts, const complexd* img, 
                               size_t img_dim, const complexd* gcf, int gcf_dim) {
    
    //TODO remove hard-coded 32

  , int baselines
  , int timesteps_x_channels
  , int img_dim
){
  degridGPU<512, 8>(permutations, out_vis, uvw, gcf, img, baselines, timesteps_x_channels, img_dim);
}

   }
}

};

template <int over> struct degridder<over, false>{

static __device__ __inline__
//__launch_bounds__(256, 6)
void degrid_kernel(complexd* out, const double3* in, size_t npts, const complexd* img, 
                              size_t img_dim, const complexd* gcf, int gcf_dim) {
   
   //TODO remove hard-coded 32
