I need to calculate the median of an array of size p inside the CUDA kernel (in my case p is small, for example p = 10). I use the O (p ^ 2) algorithm for its simplicity, but at the expense of time performance.
Is there a βfunctionβ to find the median efficiency that I can call inside the CUDA core?
I know that I can implement a selection algorithm, but I'm looking for a function and / or verified code.
Thank!
rodms source
share