<commit_before>
__kernel void add(__global const float *x, __global const float *y, __global float *z, int N) {
  int id = get_global_id(0);
  if (id >= N) return;
  z[id] = x[id] + y[id];
}<commit_msg>Updates to simple add to support vectors of dimensions > workgroup size<commit_after>// Need to define a simplified iteration id:
inline int get_index(int nelems, int index ) { 
  if (index == -1)  {
    index = get_global_id(0);
  } else {
    index += get_global_size(0);
  }

  if (index >= nelems) index = -1;

  return index;
}

__kernel void add(__global const float *x, __global const float *y, __global float *z, int N) {

  int id = get_index(N, -1);
  while(id >= 0) {
     z[id] = x[id] + y[id];
     id = get_index(N, id);
  }

}
{'fraction_non_alphanumeric': 0.14131897711978467, 'fraction_numerical': 0.009421265141318977, 'mean_word_length': 3.3508771929824563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '571501', 'n_tokens_mistral': 283, 'n_tokens_neox': 273, 'n_words': 92}