reduce gcc warnings
This commit is contained in:
parent
e4f4864ed2
commit
6ca5050f4d
@ -105,7 +105,7 @@ B sum_c1(B t, B x) {
|
||||
// Try to keep to i32 product, go to f64 on overflow or non-i32 initial
|
||||
#define DEF_INT_PROD(T) \
|
||||
static NOINLINE f64 prod_##T(void* xv, usz i, f64 init) { \
|
||||
while (i--) init*=((T*)xv)[i]; return init; \
|
||||
while (i--) { init*=((T*)xv)[i]; } return init; \
|
||||
} \
|
||||
static f64 prod_int_##T(void* xv, usz ia, i32 init) { \
|
||||
T* xp = xv; \
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
#if defined(__GNUC__) && !defined(__clang__) // have to do this at the very top because diagnostic ignoring works based on the callee location, not caller
|
||||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
#endif
|
||||
#include "../core.h"
|
||||
#include "../utils/each.h"
|
||||
#include "../utils/file.h"
|
||||
@ -144,6 +147,10 @@ static B m1c2(B t, B f, B w, B x) { // consumes w,x
|
||||
return r;
|
||||
}
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#ifdef __clang__
|
||||
#pragma GCC diagnostic ignored "-Wsometimes-uninitialized"
|
||||
#endif
|
||||
#define S_SLICES(X) \
|
||||
BSS2A X##_slc = TI(X,slice); \
|
||||
usz X##_csz = 1; \
|
||||
@ -152,7 +159,7 @@ static B m1c2(B t, B f, B w, B x) { // consumes w,x
|
||||
if (X##_cr>1) { \
|
||||
X##_csh = m_shArr(X##_cr); \
|
||||
PLAINLOOP for (usz i = 0; i < X##_cr; i++) { \
|
||||
usz v = SH(X)[i+1]; \
|
||||
usz v = SH(X)[i+1]; \
|
||||
X##_csz*= v; \
|
||||
X##_csh->a[i] = v; \
|
||||
} \
|
||||
@ -162,11 +169,6 @@ static B m1c2(B t, B f, B w, B x) { // consumes w,x
|
||||
|
||||
#define E_SLICES(X) if (X##_cr>1) ptr_dec(X##_csh); decG(X);
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#ifdef __clang__
|
||||
#pragma GCC diagnostic ignored "-Wsometimes-uninitialized"
|
||||
// no gcc case because gcc is gcc and does gcc things instead of doing what it's asked to do
|
||||
#endif
|
||||
|
||||
extern B to_fill_cell_k(B x, ur k, char* err); // from md2.c
|
||||
static B to_fill_cell_1(B x) { // consumes x
|
||||
|
||||
@ -7,7 +7,7 @@ allFiles ← ⟨⟩
|
||||
allFiles {⊑(<¯2↑𝕩)∊".c"‿".h"}¨⊸/↩
|
||||
|
||||
initialFlags ← ⟨
|
||||
"/usr/bin/clang","-std=gnu11","-Wall","-DCLANGD","-fms-extensions"
|
||||
"/usr/bin/clang","-std=gnu11","-Wall","-DCLANGD","-DFFI=2","-DCBQN_EXPORT","-fms-extensions"
|
||||
"-Wno-microsoft-anon-tag","-Wno-unused-function","-Wno-undefined-internal","-Wno-bitwise-instead-of-logical","-Wno-unknown-warning-option"
|
||||
⟩ ∾ additionalFlags ∾ enableSingeli/⟨"-DSINGELI","-march=native"⟩
|
||||
|
||||
|
||||
@ -13,12 +13,12 @@ oper &~ andnot infix none 35
|
||||
# b:B - pointer to data to index; if width{B}<width{eltype{T}}, padding bytes are garbage read after wanted position
|
||||
# idx - actual (unscaled) index list
|
||||
def gather{def:T, b:B, idx:[8]i32, M & w256{T,32}} = {
|
||||
if (M{0}) T ~~ emit{[8]i32, '_mm256_mask_i32gather_epi32', def, *i32~~b, idx, M{T,'to sign bits'}, width{eltype{B}}/8}
|
||||
else T ~~ emit{[8]i32, '_mm256_i32gather_epi32', *i32~~b, idx, width{eltype{B}}/8}
|
||||
if (M{0}) T ~~ emit{[8]i32, '_mm256_mask_i32gather_epi32', def, *void~~b, idx, M{T,'to sign bits'}, width{eltype{B}}/8}
|
||||
else T ~~ emit{[8]i32, '_mm256_i32gather_epi32', *void~~b, idx, width{eltype{B}}/8}
|
||||
}
|
||||
def gather{def:T, b:B, idx:[4]i32, M & w256{T,64}} = {
|
||||
if (M{0}) T ~~ emit{[4]i64, '_mm256_mask_i32gather_epi64', def, *i64~~b, idx, M{T,'to sign bits'}, width{eltype{B}}/8}
|
||||
else T ~~ emit{[4]i64, '_mm256_i32gather_epi64', *i64~~b, idx, width{eltype{B}}/8}
|
||||
if (M{0}) T ~~ emit{[4]i64, '_mm256_mask_i32gather_epi64', def, *void~~b, idx, M{T,'to sign bits'}, width{eltype{B}}/8}
|
||||
else T ~~ emit{[4]i64, '_mm256_i32gather_epi64', *void~~b, idx, width{eltype{B}}/8}
|
||||
}
|
||||
|
||||
def wrapChk{cw0, VI,xlf, M} = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user