Skip to content

Commit

Permalink
32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
moon-chilled committed Nov 27, 2022
1 parent 8ae5bad commit 8d06b3e
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jsrc/viavx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions jsrc/viavx1-2.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#include "j.h"
#if C_CRC32C && SY_64
#define suff
#define TH US
#include "viavx1.h"
#endif
3 changes: 3 additions & 0 deletions jsrc/viavx1-4.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#include "j.h"
#if C_CRC32C && SY_64
#define suff 2
#define TH UI4
#include "viavx1.h"
#endif
1 change: 0 additions & 1 deletion jsrc/viavx1.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "j.h"
#include "viavx.h"

// requires: suff and TH to be defined
Expand Down
2 changes: 2 additions & 0 deletions jsrc/viavx2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "j.h"
#if C_CRC32C && SY_64
#include "viavx.h"

// ********************* i., second class: tolerant comparisons, possibly boxed **********************
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion jsrc/viavx3.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "j.h"
#if C_CRC32C && SY_64
#include "viavx.h"

// ********************* i., third class: small-range arguments ****************************
Expand Down Expand Up @@ -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
3 changes: 2 additions & 1 deletion jsrc/viavx4.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions jsrc/viavx5.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "j.h"
#if C_CRC32C && SY_64
#include "viavx.h"

// ***************** i., fifth class: boxed arguments ************************
Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions jsrc/viavx6.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "j.h"
#if C_CRC32C && SY_64
#include "viavx.h"

// *************************** sixth class: hashing w ***********************
Expand Down Expand Up @@ -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

0 comments on commit 8d06b3e

Please sign in to comment.