Sorting many small arrays in CUDA -
i implementing median filter in cuda. particular pixel, extract neighbors corresponding window around pixel, n x n
(3 x 3
) window, , have array of n x n
elements. not envision using window of more 10 x 10
elements application.
this array locally present in kernel , loaded device memory. previous posts have read, common sorting algorithms implemented thrust. but, thrust can called host. thread - thrust inside user written kernels
is there quick , efficient way sort small array of n x n
elements inside kernel?
if number of elements fixed , small, can use sorting networks (http://pages.ripco.net/~jgamble/nw.html). provides fixed number of compare/swap operations fixed number of elements (eg. 19 compare/swap iterations 8 elements).
Comments
Post a Comment