Skip to content

Commit

Permalink
Fix ZHEMM copy for SVE
Browse files Browse the repository at this point in the history
Whilst disambiguating whilelt, I inadvertantly used the wrong datatype
for offsets, which can be negative. This rectifies that.
  • Loading branch information
Mousius committed Jul 27, 2023
1 parent 9ba9c8b commit 730ca04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions kernel/arm64/zhemm_ltcopy_sve.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
gat_ind = svadd_m(cmp, gat_ind, lda_vec);
gat_ind = svadd_m(svnot_z(pg, cmp) , gat_ind, 2);
if (offset <= 0) {
svbool_t off_g = svwhilelt_b64((uint64_t)offset, (uint64_t)0LL);
svbool_t off_g = svwhilelt_b64((int64_t)offset, (int64_t)0LL);
data_vec_imag = svneg_m(data_vec_imag, off_g, data_vec_imag);
}

Expand Down Expand Up @@ -143,7 +143,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
gat_ind = svadd_m(cmp, gat_ind, lda_vec);
gat_ind = svadd_m(svnot_z(pg, cmp) , gat_ind, 2);
if (offset <= 0) {
svbool_t off_g = svwhilelt_b32((uint32_t)offset, (uint32_t)0);
svbool_t off_g = svwhilelt_b32((int32_t)offset, (int32_t)0);
data_vec_imag = svneg_m(data_vec_imag, off_g, data_vec_imag);
}

Expand Down
4 changes: 2 additions & 2 deletions kernel/arm64/zhemm_utcopy_sve.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
gat_ind = svadd_m(svnot_z(pg, cmp) , gat_ind, lda_vec);
data_vec_imag = svneg_z(pg, data_vec_imag);
if (offset <= 0) {
svbool_t off_g = svwhilelt_b64((uint64_t)offset, (uint64_t)0LL);
svbool_t off_g = svwhilelt_b64((int64_t)offset, (int64_t)0LL);
data_vec_imag = svneg_m(data_vec_imag, off_g, data_vec_imag);
}

Expand Down Expand Up @@ -143,7 +143,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
gat_ind = svadd_m(svnot_z(pg, cmp) , gat_ind, lda_vec);
data_vec_imag = svneg_z(pg, data_vec_imag);
if (offset <= 0) {
svbool_t off_g = svwhilelt_b32((uint32_t)offset, (uint32_t)0);
svbool_t off_g = svwhilelt_b32((int32_t)offset, (int32_t)0);
data_vec_imag = svneg_m(data_vec_imag, off_g, data_vec_imag);
}

Expand Down

0 comments on commit 730ca04

Please sign in to comment.