Min/Max reduction with element index

Mar 8, 2013 at 6:29 PM
Hi, I need to get a min or max element value/index from an array,
I know how to get min/max value using amp_stl_algorithms::reduce, but I don't only need the value,
I also need the index of the min/max element.

I try this code:
std::vector<float> source;
source.push_back( -1.0f);
source.push_back( 3.0f);
source.push_back( 6.0f);

array_view<float> av(source.size(), source);

std::cout<<"the index of least element = "<< amp_stl_algorithms::min_element(begin(av),end(av))-begin(av);


but it gives me linking errors , after checking the code, I found that min_element function is not yet implemented in the library(along with many other functions).

So is there a way to get the min/max element index using amp, even if not necessarily using this library ?

Thanks
Apr 3, 2013 at 11:48 PM
I've now clearly marked all the unimplemented methods in the header file so it's easy to see what is and is not implemented. min_element(). I'll try and take a look at it sooner rather than later. I'm supposed to be looking at radix sort next.
Dec 13, 2014 at 4:19 PM
I need this too. Any update on when it might be available?