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
Post a Comment