Browse Source

Handle special case INCX=0,INCY=0 in the axpy interface

tags/v0.3.4
Martin Kroeker GitHub 7 years ago
parent
commit
c171b8ad13
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions
  1. +5
    -0
      interface/axpy.c
  2. +6
    -0
      interface/zaxpy.c

+ 5
- 0
interface/axpy.c View File

@@ -75,6 +75,11 @@ void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx, FLOAT *y, blasint inc

if (alpha == ZERO) return;

if (incx == 0 && incy == 0) {
*y += n * alpha *(*x);
return;
}
IDEBUG_START;

FUNCTION_PROFILE_START();


+ 6
- 0
interface/zaxpy.c View File

@@ -82,6 +82,12 @@ void CNAME(blasint n, FLOAT *ALPHA, FLOAT *x, blasint incx, FLOAT *y, blasint in

if ((alpha_r == ZERO) && (alpha_i == ZERO)) return;

if (incx == 0 && incy == 0) {
*y += n * (alpha_r * (*x) - alpha_i* (*(x+1)) );
*(y+1) += n * (alpha_i * (*x) + alpha_r * (*(x +1)) );
return;
}
IDEBUG_START;

FUNCTION_PROFILE_START();


Loading…
Cancel
Save