
/*
__local int input
__global int counter
*/

void add(
  int workgroup, 
  int cl_global_id, 
  int cl_local_id,
  int input,
  int * counter)
  {
  *counter = *counter + input;
  //printf("counter is %d, input is %d\n", *counter, input);
  
  }

void sub(
  int workgroup, 
  int cl_global_id, 
  int cl_local_id,
  int input,
  int * counter)
  {
  *counter = *counter - input;
  }
  
