]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blob - blis/frame/compat/cblas/src/cblas_icamax.c
Consolidate all git repos of linalg into one.
[dense-linear-algebra-libraries/linalg.git] / blis / frame / compat / cblas / src / cblas_icamax.c
1 #include "bli_config.h"
2 #include "bli_system.h"
3 #include "bli_type_defs.h"
4 #include "bli_cblas.h"
5 #ifdef BLIS_ENABLE_CBLAS
6 /*
7  * cblas_icamax.c
8  *
9  * The program is a C interface to icamax.
10  * It calls the fortran wrapper before calling icamax.
11  *
12  * Written by Keita Teranishi.  2/11/1998
13  *
14  */
15 #include "cblas.h"
16 #include "cblas_f77.h"
17 CBLAS_INDEX cblas_icamax( const int N, const void *X, const int incX)
18 {
19    int iamax;
20 #ifdef F77_INT
21    F77_INT F77_N=N, F77_incX=incX;
22 #else 
23    #define F77_N N
24    #define F77_incX incX
25 #endif
26    F77_icamax_sub( &F77_N, X, &F77_incX, &iamax);
27    return iamax ? iamax-1 : 0;
28 }
29 #endif