For CuArray, say, A, we can use findmax(A) to find the value and index of the highest element efficiently. Is there a similar function that does for the second element? Thank you in advance for your help.
You can try partialsort!.
For CuArray, say, A, we can use findmax(A) to find the value and index of the highest element efficiently. Is there a similar function that does for the second element? Thank you in advance for your help.
You can try partialsort!.