lapack_traits/blas/
amax.rs1use crate::Scalar;
2use num_complex::Complex32 as c32;
3use num_complex::Complex64 as c64;
4
5pub trait ITamax: Scalar {
6 unsafe fn amax(n: i32, x: &[Self], incx: i32) -> i32;
7}
8
9macro_rules! impl_itamax(
10 ($N: ty, $itamax: path) => (
11 impl ITamax for $N{
12 unsafe fn amax(n: i32, x: &[Self], incx: i32) -> i32{
13 $itamax(n, x, incx)
14 }
15 }
16 )
17);
18
19impl_itamax!(f32, cblas::isamax);
20impl_itamax!(f64, cblas::idamax);
21impl_itamax!(c32, cblas::icamax);
22impl_itamax!(c64, cblas::izamax);