Exclude altivec code paths if the compiler does not support them

This commit is contained in:
Martin Kroeker
2020-07-23 17:08:20 +02:00
committed by GitHub
parent 9796e552ea
commit 661c6bfa5a
38 changed files with 126 additions and 12 deletions

View File

@@ -37,8 +37,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#if defined(POWER8) || defined(POWER9) || defined(POWER10)
#if defined(__VEC__) || defined(__ALTIVEC__)
#include "zdot_microk_power8.c"
#endif
#endif
#ifndef HAVE_KERNEL_8
@@ -93,9 +95,11 @@ FLOAT _Complex CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG in
FLOAT dot[4] = { 0.0, 0.0, 0.0 , 0.0 } ;
if ( n <= 0 )
{
{ /*
__real__ result = 0.0 ;
__imag__ result = 0.0 ;
*/
result = OPENBLAS_MAKE_COMPLEX_FLOAT(0.0,0.0);
return(result);
}
@@ -149,11 +153,17 @@ 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_COMPLE_FLOAT(dot[0]-dot[1],dot[2]+dot[3]);
#else
/*
__real__ result = dot[0] + dot[1];
__imag__ result = dot[2] - dot[3];
*/
result = OPENBLAS_MAKE_COMPLE_FLOAT(dot[0]+dot[1],dot[2]-dot[3]);
#endif