From a6efabf15509c6dbc1b9dcf4ff569d5968523b38 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Mon, 13 Mar 2017 00:38:37 +0100 Subject: [PATCH] Replace gnu _real_ , _imag_ extensions in initializers --- kernel/x86_64/cdot.c | 13 +++++++------ kernel/x86_64/zdot.c | 15 +++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/kernel/x86_64/cdot.c b/kernel/x86_64/cdot.c index 9bba72b..4d33b6f 100644 --- a/kernel/x86_64/cdot.c +++ b/kernel/x86_64/cdot.c @@ -100,8 +100,7 @@ FLOAT _Complex CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG in if ( n <= 0 ) { - __real__ result = 0.0 ; - __imag__ result = 0.0 ; + result = OPENBLAS_MAKE_COMPLEX_FLOAT (0.0, 0.0) ; return(result); } @@ -161,11 +160,13 @@ FLOAT _Complex CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG in } #if !defined(CONJ) - __real__ result = dot[0] - dot[1]; - __imag__ result = dot[4] + dot[5]; + result = OPENBLAS_MAKE_COMPLEX_FLOAT (dot[0]-dot[1], dot[4]+dot[5]) ; +// CREAL(result) = dot[0] - dot[1]; +// CIMAG(result) = dot[4] + dot[5]; #else - __real__ result = dot[0] + dot[1]; - __imag__ result = dot[4] - dot[5]; + result = OPENBLAS_MAKE_COMPLEX_FLOAT (dot[0]+dot[1], dot[4]-dot[5]) ; +// CREAL(result) = dot[0] + dot[1]; +// CIMAG(result) = dot[4] - dot[5]; #endif diff --git a/kernel/x86_64/zdot.c b/kernel/x86_64/zdot.c index ff3a865..c1399be 100644 --- a/kernel/x86_64/zdot.c +++ b/kernel/x86_64/zdot.c @@ -95,8 +95,9 @@ FLOAT _Complex CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG in if ( n <= 0 ) { - __real__ result = 0.0 ; - __imag__ result = 0.0 ; +// CREAL(result) = 0.0 ; +// CIMAG(result) = 0.0 ; + result=OPENBLAS_MAKE_COMPLEX_FLOAT(0.0,0.0); return(result); } @@ -150,11 +151,13 @@ FLOAT _Complex CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG in } #if !defined(CONJ) - __real__ result = dot[0] - dot[1]; - __imag__ result = dot[2] + dot[3]; + result=OPENBLAS_MAKE_COMPLEX_FLOAT(dot[0]-dot[1],dot[2]+dot[3]); +// CREAL(result) = dot[0] - dot[1]; +// CIMAG(result) = dot[2] + dot[3]; #else - __real__ result = dot[0] + dot[1]; - __imag__ result = dot[2] - dot[3]; + result=OPENBLAS_MAKE_COMPLEX_FLOAT(dot[0]+dot[1],dot[2]-dot[3]); +// CREAL(result) = dot[0] + dot[1]; +// CIMAG(result) = dot[2] - dot[3]; #endif -- 2.7.4