move SIMD constrep functions to a table
This commit is contained in:
parent
0598ce8357
commit
300d217ee8
@ -829,11 +829,11 @@ B slash_c2(B t, B w, B x) {
|
||||
void* rv = m_tyarrv(&r, 1<<xk, s, xt);
|
||||
void* xv = tyany_ptr(x);
|
||||
#if SINGELI_AVX2
|
||||
#define CASE(L,T) case L: constrep_##T(wv, xv, rv, xlen); break;
|
||||
simd_constrep[xk](wv, xv, rv, xlen);
|
||||
#else
|
||||
#define CASE(L,T) case L: { REP_BY_SCAN(T, wv) break; }
|
||||
#endif
|
||||
switch (xk) { default: UD; CASE(0,u8) CASE(1,u16) CASE(2,u32) CASE(3,u64) }
|
||||
#endif
|
||||
#undef CASE
|
||||
}
|
||||
if (xr > 1) {
|
||||
|
||||
@ -180,5 +180,4 @@ fn rep_const{T}(wv:u64, x:*void, r:*void, n:u64) : void = {
|
||||
}
|
||||
}
|
||||
|
||||
export{'constrep_u8', rep_const{i8 }}; export{'constrep_u16', rep_const{i16}}
|
||||
export{'constrep_u32', rep_const{i32}}; export{'constrep_u64', rep_const{u64}}
|
||||
exportT{'simd_constrep', each{rep_const, tup{i8, i16, i32, u64}}}
|
||||
Loading…
Reference in New Issue
Block a user