Refs #929. Deal with zero and NaNs for scale.
This commit is contained in:
parent
9ea0144482
commit
ae70b916f4
|
@ -137,7 +137,7 @@ DROTKERNEL = drot.c
|
|||
#
|
||||
SSCALKERNEL = sscal.c
|
||||
DSCALKERNEL = dscal.c
|
||||
#CSCALKERNEL = ../arm/zscal.c
|
||||
CSCALKERNEL = zscal.c
|
||||
ZSCALKERNEL = zscal.c
|
||||
#
|
||||
SSWAPKERNEL = sswap.c
|
||||
|
|
|
@ -39,8 +39,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#pragma GCC optimize "O1"
|
||||
|
||||
#if defined(POWER8)
|
||||
#if defined(DOUBLE)
|
||||
#include "zscal_microk_power8.c"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HAVE_KERNEL_8
|
||||
|
@ -123,6 +125,21 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r,FLOAT da_i, F
|
|||
if ( inc_x <= 0 )
|
||||
return(0);
|
||||
|
||||
if (da_r == ZERO && da_i == ZERO) {
|
||||
//clear the vector and return
|
||||
if (inc_x == 1) {
|
||||
memset(x, 0, n*COMPSIZE*SIZE);
|
||||
}else{
|
||||
inc_x2 = 2 * inc_x;
|
||||
for(i=0; i<n; i++){
|
||||
x[ip]=ZERO;
|
||||
x[ip+1]=ZERO;
|
||||
ip += inc_x2;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( inc_x == 1 )
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue