Hi,
I've been developing a program that involves many calls to the maxval and maxloc operating on the same array. I'm wondering if anyone has ever used a subroutine that combines these two, i.e. returns the maxval and its location.
It seems goofy to find the maximum, and then find it again when determining its location. Perhaps the compiler (intel mpif90 with -O3 ) is already doing what I'm suggesting?
Any help is appreciated.
Brant
I've been developing a program that involves many calls to the maxval and maxloc operating on the same array. I'm wondering if anyone has ever used a subroutine that combines these two, i.e. returns the maxval and its location.
It seems goofy to find the maximum, and then find it again when determining its location. Perhaps the compiler (intel mpif90 with -O3 ) is already doing what I'm suggesting?
Any help is appreciated.
Brant