Rewrite assignment to complex for better portability
This commit is contained in:
parent
661c6bfa5a
commit
7c6e56b5df
|
@ -48,10 +48,11 @@ OPENBLAS_COMPLEX_FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLA
|
||||||
|
|
||||||
dot[0]=0.0;
|
dot[0]=0.0;
|
||||||
dot[1]=0.0;
|
dot[1]=0.0;
|
||||||
|
/*
|
||||||
CREAL(result) = 0.0 ;
|
CREAL(result) = 0.0 ;
|
||||||
CIMAG(result) = 0.0 ;
|
CIMAG(result) = 0.0 ;
|
||||||
|
*/
|
||||||
|
result = OPENBLAS_MAKE_COMPLEX_FLOAT(0.0,0.0);
|
||||||
if ( n < 1 ) return(result);
|
if ( n < 1 ) return(result);
|
||||||
|
|
||||||
inc_x2 = 2 * inc_x ;
|
inc_x2 = 2 * inc_x ;
|
||||||
|
@ -71,8 +72,9 @@ OPENBLAS_COMPLEX_FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLA
|
||||||
i++ ;
|
i++ ;
|
||||||
|
|
||||||
}
|
}
|
||||||
CREAL(result) = dot[0];
|
/*CREAL(result) = dot[0];
|
||||||
CIMAG(result) = dot[1];
|
CIMAG(result) = dot[1];*/
|
||||||
|
result = OPENBLAS_MAKE_COMPLEX_FLOAT(dot[0],dot[1]);
|
||||||
return(result);
|
return(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue