@@ -840,22 +840,50 @@ int izamax( int n, doublecomplex *x, int incx)
840
840
841
841
float snrm2 ( int n , float * x , int incx )
842
842
{
843
+ #ifdef __APPLE__
844
+ if (n < 1 || incx < 1 ) {
845
+ return 0 ;
846
+ }
847
+ return cblas_snrm2 (n , x , incx );
848
+ #else
843
849
return snrm2_ (& n , x , & incx );
850
+ #endif
844
851
}
845
852
846
853
double dnrm2 ( int n , double * x , int incx )
847
854
{
855
+ #ifdef __APPLE__
856
+ if (n < 1 || incx < 1 ) {
857
+ return 0 ;
858
+ }
859
+ return cblas_dnrm2 (n , x , incx );
860
+ #else
848
861
return dnrm2_ (& n , x , & incx );
862
+ #endif
849
863
}
850
864
851
865
float scnrm2 ( int n , complex * x , int incx )
852
866
{
867
+ #ifdef __APPLE__
868
+ if (n < 1 || incx < 1 ) {
869
+ return 0 ;
870
+ }
871
+ return cblas_scnrm2 (n , x , incx );
872
+ #else
853
873
return scnrm2_ (& n , x , & incx );
874
+ #endif
854
875
}
855
876
856
877
double dznrm2 ( int n , doublecomplex * x , int incx )
857
878
{
879
+ #ifdef __APPLE__
880
+ if (n < 1 || incx < 1 ) {
881
+ return 0 ;
882
+ }
883
+ return cblas_dznrm2 (n , x , incx );
884
+ #else
858
885
return dznrm2_ (& n , x , & incx );
886
+ #endif
859
887
}
860
888
861
889
float sasum ( int n , float * x , int incx )
0 commit comments