MAYBE_UNUSED
This commit is contained in:
parent
dcbceccff8
commit
d06200445b
@ -52,7 +52,7 @@ INIT_GLOBAL RangeFn getRange_fns[el_f64+1];
|
||||
#else
|
||||
#define GETRANGE(T,CHK) bool getRange_##T(void* x0, i64* res, u64 ia) { \
|
||||
assert(ia>0); T* x=x0; T min=*x,max=min; \
|
||||
{ T c=min; CHK; (void)c; } \
|
||||
{ MAYBE_UNUSED T c=min; CHK; } \
|
||||
for (ux i=1; i<ia; i++) { T c=x[i]; CHK; \
|
||||
{if(c<min)min=c;} {if(c>max)max=c;} \
|
||||
} \
|
||||
@ -248,7 +248,7 @@ static NOINLINE usz indexOfOne(B l, B e) {
|
||||
} else
|
||||
|
||||
B indexOf_c2(B t, B w, B x) {
|
||||
bool split = 0; (void) split;
|
||||
MAYBE_UNUSED bool split = 0;
|
||||
if (RARE(!isArr(w) || RNK(w)!=1)) {
|
||||
split = 1;
|
||||
B2 t = splitCells(x, w, 1);
|
||||
@ -361,7 +361,7 @@ B indexOf_c2(B t, B w, B x) {
|
||||
|
||||
GLOBAL B enclosed_0, enclosed_1;
|
||||
B memberOf_c2(B t, B w, B x) {
|
||||
bool split = 0; (void) split;
|
||||
MAYBE_UNUSED bool split = 0;
|
||||
if (isAtm(x) || RNK(x)!=1) {
|
||||
split = 1;
|
||||
B2 t = splitCells(w, x, false);
|
||||
@ -466,7 +466,7 @@ B memberOf_c2(B t, B w, B x) {
|
||||
}
|
||||
|
||||
B count_c2(B t, B w, B x) {
|
||||
bool split = 0; (void) split;
|
||||
MAYBE_UNUSED bool split = 0;
|
||||
if (RARE(!isArr(w) || RNK(w)!=1)) {
|
||||
split = 1;
|
||||
B2 t = splitCells(x, w, 2);
|
||||
|
||||
@ -654,7 +654,7 @@ B select_rows_direct(B x, ux csz, ux cam, void* inds, ux indn, u8 ie) { // ⥊ (
|
||||
assert(csz*cam == IA(x));
|
||||
assert(ie<=el_i32);
|
||||
|
||||
u8 inds_buf[INDS_BUF_MAX]; (void)inds_buf;
|
||||
MAYBE_UNUSED u8 inds_buf[INDS_BUF_MAX];
|
||||
bool generic_allowed = true; // whether required interpretation of x hasn't changed from its real one
|
||||
if (csz==1) { // TODO maybe move to select_rows_B and require csz>=2 here?
|
||||
i64 bounds[2];
|
||||
@ -684,7 +684,7 @@ B select_rows_direct(B x, ux csz, ux cam, void* inds, ux indn, u8 ie) { // ⥊ (
|
||||
}
|
||||
}
|
||||
|
||||
bool fast; (void) fast;
|
||||
MAYBE_UNUSED bool fast;
|
||||
ux xbump = csz<<lb;
|
||||
ux rbump = indn<<lb;
|
||||
i64 bounds[2];
|
||||
|
||||
@ -125,7 +125,7 @@ Arr* join_cells(B w, B x, ur k) { // consumes w,x; join k-cells, 𝕨 ∾○⥊
|
||||
|
||||
Arr *r;
|
||||
u8 xlw = elwBitLog(re);
|
||||
usz n = shProd(SH(w), 0, k); (void)n;
|
||||
MAYBE_UNUSED usz n = shProd(SH(w), 0, k);
|
||||
usz wcsz = shProd(SH(w), k, RNK(w));
|
||||
usz xcsz = shProd(SH(x), k, RNK(x));
|
||||
usz ia = IA(w)+IA(x);
|
||||
|
||||
1
src/h.h
1
src/h.h
@ -96,6 +96,7 @@ typedef size_t ux;
|
||||
#define U16_MAX ((u16)~(u16)0)
|
||||
#define U32_MAX ((u32)~(u32)0)
|
||||
#define U64_MAX ((u64)~(u64)0)
|
||||
#define MAYBE_UNUSED __attribute__((unused))
|
||||
#define NOINLINE __attribute__((noinline))
|
||||
#define FORCE_INLINE __attribute__((always_inline)) static inline
|
||||
#define NORETURN __attribute__((noreturn))
|
||||
|
||||
@ -225,7 +225,7 @@ DEF_G(void, fill, B , (void* a, usz ms, B x, usz l), ms, x, l) {
|
||||
#if SINGELI_SIMD
|
||||
#define DEF_COPY(T, BODY) DEF0(void, copy, T, u8 xe=TI(x,elType); u8 ne=el_or(xe,el_##T);, ne==el_##T, ne, (void* a, usz ms, B x, usz xs, usz l), ms, x, xs, l)
|
||||
#else
|
||||
#define DEF_COPY(T, BODY) DEF(void, copy, T, u8 xe=TI(x,elType); u8 ne=el_or(xe,el_##T);, ne==el_##T, ne, (void* a, usz ms, B x, usz xs, usz l), ms, x, xs, l) { u8 xt=TY(x); (void)xt; BODY }
|
||||
#define DEF_COPY(T, BODY) DEF(void, copy, T, u8 xe=TI(x,elType); u8 ne=el_or(xe,el_##T);, ne==el_##T, ne, (void* a, usz ms, B x, usz xs, usz l), ms, x, xs, l) { MAYBE_UNUSED u8 xt=TY(x); BODY }
|
||||
#endif
|
||||
#define BIT_COPY(T) for (usz i = 0; i < l; i++) rp[i] = bitp_get(xp, xs+i); return;
|
||||
#define PTR_COPY(X, R) vfor (usz i = 0; i < l; i++) ((R*)rp)[i] = ((X*)xp)[i+xs]; return;
|
||||
@ -603,7 +603,7 @@ ApdFn* const apd_tot_fns[]; ApdFn* const apd_sh0_fns[]; ApdFn* const apd_sh1_f
|
||||
#define APD_INC_POS(EB)
|
||||
#define APD_MK0(E, FEB, EB, TY, TARR, CIA, T0, CS) \
|
||||
NOINLINE void apd_##TY##_##E(ApdMut* m, B x) { T0 \
|
||||
usz cia=CIA; CS; u8 xe=TI(x,elType); (void)xe; \
|
||||
usz cia=CIA; CS; MAYBE_UNUSED u8 xe=TI(x,elType); \
|
||||
if (RARE(!(TARR))) APD_WIDEN(TY, x); \
|
||||
APD_OR_FILL(FEB, x); \
|
||||
usz p0 = APD_POS(EB); APD_POS(EB) = p0+cia; \
|
||||
|
||||
Loading…
Reference in New Issue
Block a user