diff --git a/kernel/power/KERNEL.POWER8 b/kernel/power/KERNEL.POWER8 index b9f44db910..594abf7957 100644 --- a/kernel/power/KERNEL.POWER8 +++ b/kernel/power/KERNEL.POWER8 @@ -122,6 +122,7 @@ ZCOPYKERNEL = zcopy.c # SDOTKERNEL = sdot.c DDOTKERNEL = ddot.c +DSDOTKERNEL = sdot.c #CDOTKERNEL = ../arm/zdot.c ZDOTKERNEL = zdot.c # diff --git a/kernel/power/sdot.c b/kernel/power/sdot.c index 31f4734857..4fdc2f5b55 100644 --- a/kernel/power/sdot.c +++ b/kernel/power/sdot.c @@ -1,5 +1,5 @@ /*************************************************************************** -Copyright (c) 2013-2016, The OpenBLAS Project +Copyright (c) 2013-2017, The OpenBLAS Project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -66,42 +66,76 @@ static FLOAT sdot_kernel_16(BLASLONG n, FLOAT *x, FLOAT *y) #endif +#if defined (DSDOT) +double CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) +#else FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) +#endif { BLASLONG i=0; BLASLONG ix=0,iy=0; + double dot = 0.0 ; - FLOAT dot = 0.0 ; +#if defined (DSDOT) + double mydot = 0.0; + FLOAT asmdot = 0.0; +#else + FLOAT mydot=0.0; +#endif + BLASLONG n1; if ( n <= 0 ) return(dot); if ( (inc_x == 1) && (inc_y == 1) ) { - BLASLONG n1 = n & -32; + n1 = n & (BLASLONG)(-32); if ( n1 ) - dot = sdot_kernel_16(n1, x, y); - +#if defined(DSDOT) + { + FLOAT *x1=x; + FLOAT *y1=y; + BLASLONG n2 = 32; + while (i