ztrmm sve copy functions

This commit is contained in:
Bine Brank 2022-01-04 14:40:59 +01:00
parent ce329ab686
commit 68c414d3a6
4 changed files with 26 additions and 26 deletions

View File

@ -53,11 +53,11 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
js = 0; js = 0;
FLOAT *ao; FLOAT *ao;
#ifdef DOUBLE #ifdef DOUBLE
svint64_t index = svindex_s64(0LL, lda*2); svint64_t index = svindex_s64(0LL, lda);
svbool_t pn = svwhilelt_b64(js, n); svbool_t pn = svwhilelt_b64(js, n);
int n_active = svcntp_b64(svptrue_b64(), pn); int n_active = svcntp_b64(svptrue_b64(), pn);
#else #else
svint32_t index = svindex_s32(0, lda*2); svint32_t index = svindex_s32(0, lda);
svbool_t pn = svwhilelt_b32(js, n); svbool_t pn = svwhilelt_b32(js, n);
int n_active = svcntp_b32(svptrue_b32(), pn); int n_active = svcntp_b32(svptrue_b32(), pn);
#endif #endif
@ -89,7 +89,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
i ++; i ++;
} else } else
if (X < posY) { if (X < posY) {
ao += lda * 2; ao += lda;
b += n_active * 2; b += n_active * 2;
X ++; X ++;
i ++; i ++;
@ -99,8 +99,8 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
int temp = 0; int temp = 0;
for (int j = 0; j < n_active; j++) { for (int j = 0; j < n_active; j++) {
for (int k = 0 ; k < j; k++) { for (int k = 0 ; k < j; k++) {
b[temp++] = *(ao+k*lda+j); b[temp++] = *(ao+k*lda+j*2);
b[temp++] = *(ao+k*lda+j+1); b[temp++] = *(ao+k*lda+j*2+1);
} }
b[temp++] = ONE; b[temp++] = ONE;
b[temp++] = ZERO; b[temp++] = ZERO;
@ -113,8 +113,8 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
int temp = 0; int temp = 0;
for (int j = 0; j < n_active; j++) { for (int j = 0; j < n_active; j++) {
for (int k = 0 ; k <= j; k++) { for (int k = 0 ; k <= j; k++) {
b[temp++] = *(ao+k*lda+j); b[temp++] = *(ao+k*lda+j*2);
b[temp++] = *(ao+k*lda+j+1); b[temp++] = *(ao+k*lda+j*2+1);
} }
for (int k = j+1; k < n_active; k++) { for (int k = j+1; k < n_active; k++) {
b[temp++] = ZERO; b[temp++] = ZERO;

View File

@ -85,7 +85,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
svfloat32x2_t aj_vec = svld2(pn, ao); svfloat32x2_t aj_vec = svld2(pn, ao);
#endif #endif
svst2(pn, b, aj_vec); svst2(pn, b, aj_vec);
ao += lda * 2; ao += lda;
b += n_active * 2; b += n_active * 2;
X ++; X ++;
i ++; i ++;
@ -101,8 +101,8 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
b[temp++] = ONE; b[temp++] = ONE;
b[temp++] = ZERO; b[temp++] = ZERO;
for (int k = j+1; k < n_active; k++) { for (int k = j+1; k < n_active; k++) {
b[temp++] = *(ao+j*lda+k); b[temp++] = *(ao+j*lda+k*2);
b[temp++] = *(ao+j*lda+k+1); b[temp++] = *(ao+j*lda+k*2+1);
} }
} }
#else #else
@ -113,12 +113,12 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
b[temp++] = ZERO; b[temp++] = ZERO;
} }
for (int k = j; k < n_active; k++) { for (int k = j; k < n_active; k++) {
b[temp++] = *(ao+j*lda+k); b[temp++] = *(ao+j*lda+k*2);
b[temp++] = *(ao+j*lda+k+1); b[temp++] = *(ao+j*lda+k*2+1);
} }
} }
#endif #endif
ao += n_active * lda * 2; ao += n_active * lda;
b += n_active*n_active * 2; b += n_active*n_active * 2;
X += n_active; X += n_active;
i += n_active; i += n_active;

View File

@ -53,11 +53,11 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
js = 0; js = 0;
FLOAT *ao; FLOAT *ao;
#ifdef DOUBLE #ifdef DOUBLE
svint64_t index = svindex_s64(0LL, lda * 2); svint64_t index = svindex_s64(0LL, lda);
svbool_t pn = svwhilelt_b64(js, n); svbool_t pn = svwhilelt_b64(js, n);
int n_active = svcntp_b64(svptrue_b64(), pn); int n_active = svcntp_b64(svptrue_b64(), pn);
#else #else
svint32_t index = svindex_s32(0, lda * 2); svint32_t index = svindex_s32(0, lda);
svbool_t pn = svwhilelt_b32(js, n); svbool_t pn = svwhilelt_b32(js, n);
int n_active = svcntp_b32(svptrue_b32(), pn); int n_active = svcntp_b32(svptrue_b32(), pn);
#endif #endif
@ -89,7 +89,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
i ++; i ++;
} else } else
if (X > posY) { if (X > posY) {
ao += lda * 2; ao += lda;
b += n_active * 2; b += n_active * 2;
X ++; X ++;
i ++; i ++;
@ -105,8 +105,8 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
b[temp++] = ONE; b[temp++] = ONE;
b[temp++] = ZERO; b[temp++] = ZERO;
for (int k = j+1; k < n_active; k++) { for (int k = j+1; k < n_active; k++) {
b[temp++] = *(ao+k*lda+j); b[temp++] = *(ao+k*lda+j*2);
b[temp++] = *(ao+k*lda+j+1); b[temp++] = *(ao+k*lda+j*2+1);
} }
} }
#else #else
@ -117,8 +117,8 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
b[temp++] = ZERO; b[temp++] = ZERO;
} }
for (int k = j; k < n_active; k++) { for (int k = j; k < n_active; k++) {
b[temp++] = *(ao+k*lda+j); b[temp++] = *(ao+k*lda+j*2);
b[temp++] = *(ao+k*lda+j+1); b[temp++] = *(ao+k*lda+j*2+1);
} }
} }
#endif #endif

View File

@ -85,7 +85,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
svfloat32x2_t aj_vec = svld2(pn, ao); svfloat32x2_t aj_vec = svld2(pn, ao);
#endif #endif
svst2(pn, b, aj_vec); svst2(pn, b, aj_vec);
ao += lda * 2; ao += lda;
b += n_active * 2; b += n_active * 2;
X ++; X ++;
i ++; i ++;
@ -95,8 +95,8 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
int temp = 0; int temp = 0;
for (int j = 0; j < n_active; j++) { for (int j = 0; j < n_active; j++) {
for (int k = 0 ; k < j; k++) { for (int k = 0 ; k < j; k++) {
b[temp++] = *(ao+j*lda+k); b[temp++] = *(ao+j*lda+k*2);
b[temp++] = *(ao+j*lda+k+1); b[temp++] = *(ao+j*lda+k*2+1);
} }
b[temp++] = ONE; b[temp++] = ONE;
b[temp++] = ZERO; b[temp++] = ZERO;
@ -109,8 +109,8 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
int temp = 0; int temp = 0;
for (int j = 0; j < n_active; j++) { for (int j = 0; j < n_active; j++) {
for (int k = 0 ; k <= j; k++) { for (int k = 0 ; k <= j; k++) {
b[temp++] = *(ao+j*lda+k); b[temp++] = *(ao+j*lda+k*2);
b[temp++] = *(ao+j*lda+k+1); b[temp++] = *(ao+j*lda+k*2+1);
} }
for (int k = j+1; k < n_active; k++) { for (int k = j+1; k < n_active; k++) {
b[temp++] = ZERO; b[temp++] = ZERO;
@ -118,7 +118,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
} }
} }
#endif #endif
ao += n_active * lda * 2; ao += n_active * lda;
b += n_active*n_active * 2; b += n_active*n_active * 2;
X += n_active; X += n_active;
i += n_active; i += n_active;