Skip to content

Commit 8ee0910

Browse files
committed
change for PRODX
1 parent 16da703 commit 8ee0910

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

jsrc/xdic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ static DF1(jtcreatedic1){F12IP;A box,box1; // temp for box contents
203203
I deffg=DICFSINGLETHREADED; if(AN(box)>0){if(!(AT(box)&B01))RZ(box=ccvt(B01,box,0)) if(!BAV(box)[0])deffg=0;} // set concurrent if user specifies it
204204
flags|=deffg; // remember user's choice
205205

206-
I t, r, n, *s; // type, rank, #atoms in item, pointer to shape of value then key
206+
I t, r, n, n1, *s; // type, rank, #atoms in item, pointer to shape of value then key
207207
// valuespec. must be 2 boxes
208208
box=C(AAV(w)[3]); ASSERT(AT(box)&BOX,EVDOMAIN) ASSERT(AR(box)==1,EVRANK) ASSERT(AN(box)==2,EVLENGTH)
209209
box1=C(AAV(box)[0]); t=rei0(box1); ASSERT(((t=fromonehottype(t,jt))&NOUN+SPARSE)>0,EVDOMAIN) flags|=t&DIRECT?0:DICFVINDIR; // type. convert from 3!:0 form, which must be an atomic integer, to internal type, which must be valid. Remember if indirect
@@ -214,7 +214,7 @@ static DF1(jtcreatedic1){F12IP;A box,box1; // temp for box contents
214214
// keyspec. must be 2 boxes
215215
box=C(AAV(w)[2]); ASSERT(AT(box)&BOX,EVDOMAIN) ASSERT(AR(box)==1,EVRANK) ASSERT(AN(box)==2,EVLENGTH)
216216
box1=C(AAV(box)[0]); t=rei0(box1); ASSERT(((t=fromonehottype(t,jt))&NOUN+SPARSE)>0,EVDOMAIN) flags|=t&DIRECT?0:DICFKINDIR; // type. convert from 3!:0 form, which must be an atomic integer, to internal type, which must be valid. Remember if indirect
217-
box1=C(AAV(box)[1]); r=AN(box1); ASSERT(AR(box1)<=1,EVRANK) ASSERT(r>=0,EVLENGTH) RZ(box1=ccvt(INT,ravel(box1),0)) s=IAV(box1); PRODX(n,r,s,1) ((DIC*)z)->bloc.kaii=n; ASSERT(n>0,EVLENGTH) // shape. copy to allow IAV1. get # atoms in item & save
217+
box1=C(AAV(box)[1]); r=AN(box1); ASSERT(AR(box1)<=1,EVRANK) ASSERT(r>=0,EVLENGTH) RZ(box1=ccvt(INT,ravel(box1),0)) s=IAV(box1); PRODX(n1,r,s,1) ((DIC*)z)->bloc.kaii=n1; ASSERT(n1>0,EVLENGTH) // shape. copy to allow IAV1. get # atoms in item & save
218218
ASSERT(AN(box1)<=9 || flags&DICFICF,EVNONCE) // if the user has a compare function, we want virt to be on the stack to save registers. Make sure the rank is OK then
219219
INCORPNV(box1); ((DIC*)z)->bloc.kshape=box1; ((DIC*)z)->bloc.ktype=t; I l=n<<bplg(t); ((DIC*)z)->bloc.kbytelen=l; // save shape & type; save #bytes in key
220220
UI4 (*fn2)()=l&(SZI-1)?(UI4 (*)())crcbytes:(UI4 (*)())crcwords; fn2=(t&XNUM+RAT)?crcxnums:fn2; fn2=(t&CMPX+FL+QP)?crcfloats:fn2; fn2=(t&BOX)?crcboxes:fn2; fn2=flags&DICFIHF?fn2:(UI4 (*)())FAV(a)->valencefns[0]; ((DIC*)z)->bloc.hashfn=fn2; // save internal or external hash function

0 commit comments

Comments
 (0)