Skip to content

Commit

Permalink
Merge pull request #4497 from sergei-lewis/dev/slewis/zaxpy
Browse files Browse the repository at this point in the history
Fix axpy test hangs when n==0. Reenable zaxpy_vector kernel for C910V.
  • Loading branch information
martin-frbg authored Feb 9, 2024
2 parents ba3bfe8 + ff15231 commit b1ae777
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions kernel/riscv64/KERNEL.C910V
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ ZSUMKERNEL = ../arm/zsum.c

SAXPYKERNEL = axpy_vector.c
DAXPYKERNEL = axpy_vector.c
CAXPYKERNEL = zaxpy.c
ZAXPYKERNEL = zaxpy.c
CAXPYKERNEL = zaxpy_vector.c
ZAXPYKERNEL = zaxpy_vector.c

SAXPBYKERNEL = axpby_vector.c
DAXPBYKERNEL = axpby_vector.c
Expand Down
2 changes: 1 addition & 1 deletion kernel/riscv64/axpy_vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
FLOAT_V_T vy0, vy1;
BLASLONG stride_x, stride_y;

if (n < 0) return(0);
if (n <= 0) return(0);
if (da == 0.0) return(0);

if (inc_x == 1 && inc_y == 1) {
Expand Down
8 changes: 4 additions & 4 deletions kernel/riscv64/zaxpy_vector.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da_r, FLOAT da_i, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *dummy, BLASLONG dummy2)
{
BLASLONG i = 0, j = 0;
BLASLONG ix = 0,iy = 0;
if(n < 0) return(0);
if(da_r == 0.0 && da_i == 0.0) return(0);
BLASLONG i = 0, j = 0;
BLASLONG ix = 0,iy = 0;
if(n <= 0) return(0);
if(da_r == 0.0 && da_i == 0.0) return(0);
unsigned int gvl = 0;
BLASLONG stride_x = inc_x * 2 * sizeof(FLOAT);
BLASLONG stride_y = inc_y * 2 * sizeof(FLOAT);
Expand Down

0 comments on commit b1ae777

Please sign in to comment.