diff --git a/jsrc/viavx.c b/jsrc/viavx.c index af333aba4..493493426 100644 --- a/jsrc/viavx.c +++ b/jsrc/viavx.c @@ -7,10 +7,10 @@ #include "j.h" #include "vcomp.h" -#include "viavx.h" // platforms with hardware crc32c #if C_CRC32C && SY_64 +#include "viavx.h" #if !(C_AVX || EMU_AVX) #error need avx or emulation to work diff --git a/jsrc/viavx1-2.c b/jsrc/viavx1-2.c index 307c19ad1..d58348327 100644 --- a/jsrc/viavx1-2.c +++ b/jsrc/viavx1-2.c @@ -1,3 +1,6 @@ +#include "j.h" +#if C_CRC32C && SY_64 #define suff #define TH US #include "viavx1.h" +#endif diff --git a/jsrc/viavx1-4.c b/jsrc/viavx1-4.c index 1367f601f..7d69d5bc4 100644 --- a/jsrc/viavx1-4.c +++ b/jsrc/viavx1-4.c @@ -1,3 +1,6 @@ +#include "j.h" +#if C_CRC32C && SY_64 #define suff 2 #define TH UI4 #include "viavx1.h" +#endif diff --git a/jsrc/viavx1.h b/jsrc/viavx1.h index ac5e48a6b..c3af95691 100644 --- a/jsrc/viavx1.h +++ b/jsrc/viavx1.h @@ -1,4 +1,3 @@ -#include "j.h" #include "viavx.h" // requires: suff and TH to be defined diff --git a/jsrc/viavx2.c b/jsrc/viavx2.c index e86ea1c64..7aeaedbb6 100644 --- a/jsrc/viavx2.c +++ b/jsrc/viavx2.c @@ -1,4 +1,5 @@ #include "j.h" +#if C_CRC32C && SY_64 #include "viavx.h" // ********************* i., second class: tolerant comparisons, possibly boxed ********************** @@ -212,3 +213,4 @@ IOFT(D,UI4,jtiod12,HIDMSK(v), TFINDXYT,TFINDY1T,TFINDY1TKEY,*v!=av[hj], IOFT(A,UI4,jtioa2, cthia(ctmask,1.0,C(*v)),TFINDBX,TFINDBY,TFINDBYKEY,!eqa(n,v,av+n*hj), !eqa(n,v,av+n*hj), D x) // singleton box IOFT(A,UI4,jtioa12,cthia(ctmask,1.0,C(*v)),TFINDBX,TFINDBY,TFINDBYKEY,!equ(C(*v),C(av[hj])),!equ(C(*v),C(av[hj])), D x) +#endif diff --git a/jsrc/viavx3.c b/jsrc/viavx3.c index 12bd23e21..d5ebe688a 100644 --- a/jsrc/viavx3.c +++ b/jsrc/viavx3.c @@ -1,4 +1,5 @@ #include "j.h" +#if C_CRC32C && SY_64 #include "viavx.h" // ********************* i., third class: small-range arguments **************************** @@ -160,4 +161,4 @@ IOFSMALLRANGE(jtio12,UC, US) IOFSMALLRANGE(jtio14,UC, UI4) // 1-byte items, us IOFSMALLRANGE(jtio22,US, US) IOFSMALLRANGE(jtio24,US, UI4) // 2-byte items, using small/large hashtable IOFSMALLRANGE(jtio42,UI4,US) IOFSMALLRANGE(jtio44,UI4,UI4) // 4-byte items, using small/large hashtable IOFSMALLRANGE(jtio82,I, US) IOFSMALLRANGE(jtio84,I, UI4) // SZI-byte items, using small/large hashtable - +#endif diff --git a/jsrc/viavx4.c b/jsrc/viavx4.c index 6dfd95046..e3eb0d537 100644 --- a/jsrc/viavx4.c +++ b/jsrc/viavx4.c @@ -1,10 +1,10 @@ #include "j.h" +#if C_CRC32C && SY_64 #include "viavx.h" // ******************* i., fourth class: sequential comparison *************************************** // implemented only for i. i: e. u/. - perhaps should revert for other compounds - // fz=bit0 = commutative, bit1 set if incomplete y must be filled with 0 (to avoid isub oflo), bit2 set if incomplete x must be filled with i (for fdiv NaN), // bit3 set for int-to-float on x, bit4 for int-to-float on y // bit5 set to suppress loop-unrolling @@ -164,3 +164,4 @@ A jtiosc(J jt,I mode,I n,I asct,I wsct,I ac,I wc,A a,A w,A z){I j,p,q; void *u,* } R z; // return non-error indic, but also where the partition count for IFORKEY is stored } /* right argument cell is scalar or list; only for modes IIDOT IICO IEPS, and intolerant IFORKEY */ +#endif diff --git a/jsrc/viavx5.c b/jsrc/viavx5.c index c24e37940..ef7af9ba0 100644 --- a/jsrc/viavx5.c +++ b/jsrc/viavx5.c @@ -1,4 +1,5 @@ #include "j.h" +#if C_CRC32C && SY_64 #include "viavx.h" // ***************** i., fifth class: boxed arguments ************************ @@ -112,3 +113,4 @@ IOF(jtiobs){A*av,*wv,y;B *yb,*zb;C*zc;I acn,*hu,*hv,l,m1,md,s,wcn,*zi,*zv; }} R h; } /* a i.!.0 w on boxed a,w by grading and binary search */ +#endif diff --git a/jsrc/viavx6.c b/jsrc/viavx6.c index 4b32ab166..a07f3724d 100644 --- a/jsrc/viavx6.c +++ b/jsrc/viavx6.c @@ -1,4 +1,5 @@ #include "j.h" +#if C_CRC32C && SY_64 #include "viavx.h" // *************************** sixth class: hashing w *********************** @@ -80,3 +81,4 @@ IOFXW(D, UI4,jtiowc012,,hic01((UIL*)v), *v!=wv[hj], 1) // float IOFXW(Z, UI4,jtiowz012,,hic0(2,(UIL*)v), (v[0].re!=wv[hj].re)||(v[0].im!=wv[hj].im), 1) // complex atom IOFXW(D, UI4,jtiowc02,, hic0(n,(UIL*)v), fcmp0(v,&wv[n*hj],n), cn) // float array IOFXW(Z, UI4,jtiowz02,, hic0(2*n,(UIL*)v),fcmp0((D*)v,(D*)&wv[n*hj],2*n), cn) // complex array +#endif