Browse Source

Merge pull request #3984 from martin-frbg/develop

Fix logic bug in single-threaded C/Z SPR
tags/v0.3.23
Martin Kroeker GitHub 2 years ago
parent
commit
eb0793bfd0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      driver/level2/zspr_k.c

+ 2
- 2
driver/level2/zspr_k.c View File

@@ -53,7 +53,7 @@ int CNAME(BLASLONG m, FLOAT alpha_r, FLOAT alpha_i,


for (i = 0; i < m; i++){ for (i = 0; i < m; i++){
#ifndef LOWER #ifndef LOWER
if ((X[i * 2 + 0] != ZERO) && (X[i * 2 + 1] != ZERO)) {
if ((X[i * 2 + 0] != ZERO) || (X[i * 2 + 1] != ZERO)) {
AXPYU_K(i + 1, 0, 0, AXPYU_K(i + 1, 0, 0,
alpha_r * X[i * 2 + 0] - alpha_i * X[i * 2 + 1], alpha_r * X[i * 2 + 0] - alpha_i * X[i * 2 + 1],
alpha_i * X[i * 2 + 0] + alpha_r * X[i * 2 + 1], alpha_i * X[i * 2 + 0] + alpha_r * X[i * 2 + 1],
@@ -61,7 +61,7 @@ int CNAME(BLASLONG m, FLOAT alpha_r, FLOAT alpha_i,
} }
a += (i + 1) * 2; a += (i + 1) * 2;
#else #else
if ((X[i * 2 + 0] != ZERO) && (X[i * 2 + 1] != ZERO)) {
if ((X[i * 2 + 0] != ZERO) || (X[i * 2 + 1] != ZERO)) {
AXPYU_K(m - i, 0, 0, AXPYU_K(m - i, 0, 0,
alpha_r * X[i * 2 + 0] - alpha_i * X[i * 2 + 1], alpha_r * X[i * 2 + 0] - alpha_i * X[i * 2 + 1],
alpha_i * X[i * 2 + 0] + alpha_r * X[i * 2 + 1], alpha_i * X[i * 2 + 0] + alpha_r * X[i * 2 + 1],


Loading…
Cancel
Save