c++ - OpenCL find Max in vector of 1.8 million records -


i have find minimum , maximum of vector on 1.8 million records in it, current method this:

__kernel void minimum(__global const double* temperaturevalues, __global double* c) { int id = get_global_id(0); int n = get_global_size(0); (int = 0; < n; i++)     {         if (temperaturevalues[i] < c[0])         {              c[0] = temperaturevalues[i];         }     } } 

but linear search crashes computer when working on full dataset (works on smaller dataset of around 180,000 records). got suggestions on how adapt work large dataset?


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -