runKCM :: KC a -> (Int,Int) -> KernelMap -> ((a,(Int,Int),KernelMap) ,String)
runKCM (Input arr) (ai,ki) km = ((GlobalArray ai,(ai+1,ki),km) ,allocate ++ copy)
   where 
     allocate = allocInput (GlobalArray ai)
     copy     = copyInput  (GlobalArray ai)
runKCM :: KC a -> (Int,Int) -> KernelMap -> ((a,(Int,Int),KernelMap) ,String)
runKCM (Input arr) (ai,ki) km = ((GlobalArray ai,(ai+1,ki),km) ,allocate ++ copy)
   where 
     allocate = allocInput (GlobalArray ai)
     copy     = copyInput  (GlobalArray ai)
runKCM (Input arr) (ai,ki) km = ((GlobalArray ai,(ai+1,ki),km) ,allocate ++ copy)
   where 
     allocate = allocInput (GlobalArray ai)
     copy     = copyInput  (GlobalArray ai)