An implementation of the ID3 Decision Tree algorithm in Java from scratch.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
391 B

4 years ago
  1. __kernel void sumReduction(__global int *A, __global int* C, int offset)
  2. {
  3. int global_id = get_global_id(0);
  4. //if(get_global_size(0) < 5)
  5. // printf("Thread id = %d", global_id);
  6. int start = global_id * offset;
  7. int end = start + offset;
  8. int i;
  9. for(i=start; i<end; i++)
  10. {
  11. C[global_id] += A[i];
  12. }
  13. }