Skip to content

Commit 24586bc

Browse files
committed
Disambiguate whilelt
1 parent f971ef5 commit 24586bc

21 files changed

+101
-80
lines changed

kernel/arm64/cgemm_ncopy_sve_v1.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -52,7 +53,7 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b){
5253
boffset = b;
5354

5455
j = 0;
55-
svbool_t pg = svwhilelt_b32(j, n);
56+
svbool_t pg = svwhilelt_b32((uint64_t)j, (uint64_t)n);
5657
uint32_t active = svcntp_b32(svptrue_b32(), pg);
5758
do {
5859

@@ -69,7 +70,7 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b){
6970
aoffset += active * lda * 2;
7071

7172
j += svcntw();
72-
pg = svwhilelt_b32(j, n);
73+
pg = svwhilelt_b32((uint64_t)j, (uint64_t)n);
7374
active = svcntp_b32(svptrue_b32(), pg);
7475

7576

kernel/arm64/cgemm_tcopy_sve_v1.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -50,7 +51,7 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b){
5051
boffset = b;
5152

5253
j = 0;
53-
svbool_t pg = svwhilelt_b32(j, n);
54+
svbool_t pg = svwhilelt_b32((uint64_t)j, (uint64_t)n);
5455
uint32_t active = svcntp_b32(svptrue_b32(), pg);
5556
do {
5657

@@ -66,7 +67,7 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b){
6667
aoffset += active * 2;
6768

6869
j += svcntw();
69-
pg = svwhilelt_b32(j, n);
70+
pg = svwhilelt_b32((uint64_t)j, (uint64_t)n);
7071
active = svcntp_b32(svptrue_b32(), pg);
7172

7273
} while (svptest_any(svptrue_b32(), pg));

kernel/arm64/symm_lcopy_sve.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -52,7 +53,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
5253
svint64_t one_vec = svdup_s64(1LL);
5354

5455
int64_t j = 0;
55-
svbool_t pg = svwhilelt_b64(j, n);
56+
svbool_t pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
5657
int64_t active = svcntp_b64(svptrue_b64(), pg);
5758
svint64_t index_neg = svindex_s64(0LL, -1LL);
5859
svint64_t index = svindex_s64(0LL, 1LL);
@@ -86,7 +87,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
8687
posX += sve_size;
8788
posX_vec = svdup_s64(posX);
8889
j += sve_size;
89-
pg = svwhilelt_b64(j, n);
90+
pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
9091
active = svcntp_b64(svptrue_b64(), pg);
9192
} while (svptest_any(svptrue_b64(), pg));
9293

@@ -99,7 +100,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
99100

100101
int32_t N = n;
101102
int32_t j = 0;
102-
svbool_t pg = svwhilelt_b32(j, N);
103+
svbool_t pg = svwhilelt_b32((uint32_t)j, (uint32_t)N);
103104
int32_t active = svcntp_b32(svptrue_b32(), pg);
104105
svint32_t index_neg = svindex_s32(0, -1);
105106
svint32_t index = svindex_s32(0, 1);
@@ -133,7 +134,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
133134
posX += sve_size;
134135
posX_vec = svdup_s32(posX);
135136
j += sve_size;
136-
pg = svwhilelt_b32(j, N);
137+
pg = svwhilelt_b32((uint32_t)j, (uint32_t)N);
137138
active = svcntp_b32(svptrue_b32(), pg);
138139
} while (svptest_any(svptrue_b32(), pg));
139140

kernel/arm64/symm_ucopy_sve.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -52,7 +53,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
5253
svint64_t one_vec = svdup_s64(1LL);
5354

5455
int64_t j = 0;
55-
svbool_t pg = svwhilelt_b64(j, n);
56+
svbool_t pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
5657
int64_t active = svcntp_b64(svptrue_b64(), pg);
5758
svint64_t index_neg = svindex_s64(0LL, -1LL);
5859
svint64_t index = svindex_s64(0LL, 1LL);
@@ -86,7 +87,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
8687
posX += sve_size;
8788
posX_vec = svdup_s64(posX);
8889
j += sve_size;
89-
pg = svwhilelt_b64(j, n);
90+
pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
9091
active = svcntp_b64(svptrue_b64(), pg);
9192
} while (svptest_any(svptrue_b64(), pg));
9293

@@ -99,7 +100,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
99100

100101
int32_t N = n;
101102
int32_t j = 0;
102-
svbool_t pg = svwhilelt_b32(j, N);
103+
svbool_t pg = svwhilelt_b32((uint32_t)j, (uint32_t)N);
103104
int32_t active = svcntp_b32(svptrue_b32(), pg);
104105
svint32_t index_neg = svindex_s32(0, -1);
105106
svint32_t index = svindex_s32(0, 1);
@@ -133,7 +134,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
133134
posX += sve_size;
134135
posX_vec = svdup_s32(posX);
135136
j += sve_size;
136-
pg = svwhilelt_b32(j, N);
137+
pg = svwhilelt_b32((uint32_t)j, (uint32_t)N);
137138
active = svcntp_b32(svptrue_b32(), pg);
138139
} while (svptest_any(svptrue_b32(), pg));
139140

kernel/arm64/trsm_ltcopy_sve.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -55,12 +56,12 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG offset, FLOAT
5556
jj = offset;
5657
#ifdef DOUBLE
5758
int64_t js = 0;
58-
svbool_t pn = svwhilelt_b64(js, n);
59+
svbool_t pn = svwhilelt_b64((uint64_t)js, (uint64_t)n);
5960
int n_active = svcntp_b64(svptrue_b64(), pn);
6061
#else
6162
int32_t N = n;
6263
int32_t js = 0;
63-
svbool_t pn = svwhilelt_b32(js, N);
64+
svbool_t pn = svwhilelt_b32((uint32_t)js, (uint32_t)N);
6465
int n_active = svcntp_b32(svptrue_b32(), pn);
6566
#endif
6667
do {
@@ -104,11 +105,11 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG offset, FLOAT
104105

105106
js += n_active;
106107
#ifdef DOUBLE
107-
pn = svwhilelt_b64(js, n);
108+
pn = svwhilelt_b64((uint64_t)js, (uint64_t)n);
108109
n_active = svcntp_b64(svptrue_b64(), pn);
109110
} while (svptest_any(svptrue_b64(), pn));
110111
#else
111-
pn = svwhilelt_b32(js, N);
112+
pn = svwhilelt_b32((uint32_t)js, (uint32_t)N);
112113
n_active = svcntp_b32(svptrue_b32(), pn);
113114
} while (svptest_any(svptrue_b32(), pn));
114115
#endif

kernel/arm64/trsm_uncopy_sve.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -56,13 +57,13 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG offset, FLOAT
5657
#ifdef DOUBLE
5758
int64_t js = 0;
5859
svint64_t index = svindex_s64(0LL, lda);
59-
svbool_t pn = svwhilelt_b64(js, n);
60+
svbool_t pn = svwhilelt_b64((uint64_t)js, (uint64_t)n);
6061
int n_active = svcntp_b64(svptrue_b64(), pn);
6162
#else
6263
int32_t N = n;
6364
int32_t js = 0;
6465
svint32_t index = svindex_s32(0, lda);
65-
svbool_t pn = svwhilelt_b32(js, N);
66+
svbool_t pn = svwhilelt_b32((uint32_t)js, (uint32_t)N);
6667
int n_active = svcntp_b32(svptrue_b32(), pn);
6768
#endif
6869
do {
@@ -106,11 +107,11 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG offset, FLOAT
106107

107108
js += n_active;
108109
#ifdef DOUBLE
109-
pn = svwhilelt_b64(js, n);
110+
pn = svwhilelt_b64((uint64_t)js, (uint64_t)n);
110111
n_active = svcntp_b64(svptrue_b64(), pn);
111112
} while (svptest_any(svptrue_b64(), pn));
112113
#else
113-
pn = svwhilelt_b32(js, N);
114+
pn = svwhilelt_b32((uint32_t)js, (uint32_t)N);
114115
n_active = svcntp_b32(svptrue_b32(), pn);
115116
} while (svptest_any(svptrue_b32(), pn));
116117
#endif

kernel/arm64/trsm_utcopy_sve.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -55,12 +56,12 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG offset, FLOAT
5556
jj = offset;
5657
#ifdef DOUBLE
5758
int64_t js = 0;
58-
svbool_t pn = svwhilelt_b64(js, n);
59+
svbool_t pn = svwhilelt_b64((uint64_t)js, (uint64_t)n);
5960
int n_active = svcntp_b64(svptrue_b64(), pn);
6061
#else
6162
int32_t N = n;
6263
int32_t js = 0;
63-
svbool_t pn = svwhilelt_b32(js, N);
64+
svbool_t pn = svwhilelt_b32((uint32_t)js, (uint32_t)N);
6465
int n_active = svcntp_b32(svptrue_b32(), pn);
6566
#endif
6667
do {
@@ -104,11 +105,11 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG offset, FLOAT
104105

105106
js += n_active;
106107
#ifdef DOUBLE
107-
pn = svwhilelt_b64(js, n);
108+
pn = svwhilelt_b64((uint64_t)js, (uint64_t)n);
108109
n_active = svcntp_b64(svptrue_b64(), pn);
109110
} while (svptest_any(svptrue_b64(), pn));
110111
#else
111-
pn = svwhilelt_b32(js, N);
112+
pn = svwhilelt_b32((uint32_t)js, (uint32_t)N);
112113
n_active = svcntp_b32(svptrue_b32(), pn);
113114
} while (svptest_any(svptrue_b32(), pn));
114115
#endif

kernel/arm64/zgemm_ncopy_sve_v1.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -52,7 +53,7 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b){
5253
boffset = b;
5354

5455
j = 0;
55-
svbool_t pg = svwhilelt_b64(j, n);
56+
svbool_t pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
5657
uint64_t active = svcntp_b64(svptrue_b64(), pg);
5758
do {
5859

@@ -69,7 +70,7 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b){
6970
aoffset += active * lda * 2;
7071

7172
j += svcntd();
72-
pg = svwhilelt_b64(j, n);
73+
pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
7374
active = svcntp_b64(svptrue_b64(), pg);
7475

7576

kernel/arm64/zgemm_tcopy_sve_v1.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -50,7 +51,7 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b){
5051
boffset = b;
5152

5253
j = 0;
53-
svbool_t pg = svwhilelt_b64(j, n);
54+
svbool_t pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
5455
uint64_t active = svcntp_b64(svptrue_b64(), pg);
5556
do {
5657

@@ -66,7 +67,7 @@ int CNAME(BLASLONG m, BLASLONG n, IFLOAT *a, BLASLONG lda, IFLOAT *b){
6667
aoffset += active * 2;
6768

6869
j += svcntd();
69-
pg = svwhilelt_b64(j, n);
70+
pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
7071
active = svcntp_b64(svptrue_b64(), pg);
7172

7273
} while (svptest_any(svptrue_b64(), pg));

kernel/arm64/zhemm_ltcopy_sve.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*********************************************************************/
22
/* Copyright 2009, 2010 The University of Texas at Austin. */
3+
/* Copyright 2023 The OpenBLAS Project */
34
/* All rights reserved. */
45
/* */
56
/* Redistribution and use in source and binary forms, with or */
@@ -54,7 +55,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
5455
svint64_t one_vec = svdup_s64(1LL);
5556

5657
int64_t j = 0;
57-
svbool_t pg = svwhilelt_b64(j, n);
58+
svbool_t pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
5859
int64_t active = svcntp_b64(svptrue_b64(), pg);
5960
svint64_t index_neg = svindex_s64(0LL, -1LL);
6061
svint64_t index = svindex_s64(0LL, 1LL);
@@ -79,7 +80,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
7980
gat_ind = svadd_m(cmp, gat_ind, lda_vec);
8081
gat_ind = svadd_m(svnot_z(pg, cmp) , gat_ind, 2);
8182
if (offset <= 0) {
82-
svbool_t off_g = svwhilelt_b64(offset, 0LL);
83+
svbool_t off_g = svwhilelt_b64((uint64_t)offset, (uint64_t)0LL);
8384
data_vec_imag = svneg_m(data_vec_imag, off_g, data_vec_imag);
8485
}
8586

@@ -99,7 +100,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
99100
posX += sve_size;
100101
posX_vec = svdup_s64(posX);
101102
j += sve_size;
102-
pg = svwhilelt_b64(j, n);
103+
pg = svwhilelt_b64((uint64_t)j, (uint64_t)n);
103104
active = svcntp_b64(svptrue_b64(), pg);
104105
} while (svptest_any(svptrue_b64(), pg));
105106

@@ -117,7 +118,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
117118

118119
int32_t j = 0;
119120
int32_t N = n;
120-
svbool_t pg = svwhilelt_b32(j, N);
121+
svbool_t pg = svwhilelt_b32((uint32_t)j, (uint32_t)N);
121122
int32_t active = svcntp_b32(svptrue_b32(), pg);
122123
svint32_t index_neg = svindex_s32(0, -1);
123124
svint32_t index = svindex_s32(0, 1);
@@ -142,7 +143,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
142143
gat_ind = svadd_m(cmp, gat_ind, lda_vec);
143144
gat_ind = svadd_m(svnot_z(pg, cmp) , gat_ind, 2);
144145
if (offset <= 0) {
145-
svbool_t off_g = svwhilelt_b32(offset, 0);
146+
svbool_t off_g = svwhilelt_b32((uint32_t)offset, (uint32_t)0);
146147
data_vec_imag = svneg_m(data_vec_imag, off_g, data_vec_imag);
147148
}
148149

@@ -162,7 +163,7 @@ int CNAME(BLASLONG m, BLASLONG n, FLOAT *a, BLASLONG lda, BLASLONG posX, BLASLON
162163
posX += sve_size;
163164
posX_vec = svdup_s32(posX);
164165
j += sve_size;
165-
pg = svwhilelt_b32(j, N);
166+
pg = svwhilelt_b32((uint32_t)j, (uint32_t)N);
166167
active = svcntp_b32(svptrue_b32(), pg);
167168
} while (svptest_any(svptrue_b32(), pg));
168169

0 commit comments

Comments
 (0)