Why is there a blas routine (ISAMAX) for argmax abs but no for argmax?

Why is there a blas ISAMAX routine for argmax abs but not argmax ?

In C ++, using std :: max_element with the compiler optimization flag -O3I get speeds comparable to blas_isamax (16 ms versus 9 ms), so at the moment my question is more of interest than due to the need for speed.

+4
source share
2 answers

BLAS was designed to provide the low-level routines needed to implement common linear algebra operations (after all, these are the Basic Linear Algebra Algebra routines).

To name just one of many applications, obtaining the element of the largest magnitude of the vector is necessary to select the axis in the factorization LU , which is one of the most fundamental workhorses of linear algebra. For comparison, getting the max element in principle will never be needed for linear algebra, so it is not one of the BLAS * operations.

(*) It was recommended that the maximum operation be added to BLAS in the 2001 BLAS Technical Forum standard, but is not yet widely used.

+5
source

BLAS , LAPACK. ISAMAX . wikipedia. LAPACK , BLAS .

, , ++ - std::max_element. .

+3

All Articles