copyInput (GlobalArray id) = 
  "  cudaMemcpy(dinput"++ sid ++ ",input" ++ sid ++", sizeof(int) * input"++sid++"size, cudaMemcpyHostToDevice);\n" 
  where sid = show id
copyInput (GlobalArray id) = 
  "  cudaMemcpy(dinput"++ sid ++ ",input" ++ sid ++", sizeof(int) * input"++sid++"size, cudaMemcpyHostToDevice);\n" 
  where sid = show id
copyInput (GlobalArray id) = 
  "  cudaMemcpy(dinput"++ sid ++ ",input" ++ sid ++", sizeof(int) * input"++sid++"size, cudaMemcpyHostToDevice);\n" 
  where sid = show id