You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Az0; RZ(dfv1(z0,w,fs)) if(t&FL&&unlikely(!all0(jtisnan(jt,z0)))){RESETERR; Routfix(a,w,self);} // take u/ y; if FL, see if result contains NaN, failover if so to slow version
358
+
Az1; z=irs2(z0,dfv2(z1,a,w,bslash(fs)),c==CPLUS?ds(CMINUS):f, RMAX,-1L,jtatomic2); // x u/\. y = (u/ y) uinv x u/\ y
359
+
if(jt->jerr==EVNAN){RESETERR; Routfix(a,w,self);}elseRz; // failover if NaN
// PRODX takes the product of init and v[0..n-1], generating error if overflow, but waiting till the end so no error if there is a 0 in the product
2085
2085
// overflow sets z to the error value of 0; if we see a multiplicand of 0 we stop right away so we can skip the error
2086
2086
// This is written to be branchless for rank < 3
2087
+
// n may be negative
2087
2088
#ifSY_64
2088
2089
// I have been unable to make clang produce a simple loop that doesn't end with a backward branch. So I am going to handle ranks 0-2 here and call a subroutine for the rest
#definerasv(x) {I c=AC(x); if(likely(!ACISPERM(c))){if(c<0)AC(x)=(I)((UI)c+(ACINPLACE+ACUC1));else raincr(x); radescend(x,sv)}} // better a misbranch than an atomic instruction if c<0. Could avoid recur check if AC>1
922
922
#definera(x) {I c=AC(x); if(likely(!ACISPERM(c))){if(c<0)AC(x)=(I)((UI)c+(ACINPLACE+ACUC1));else raincr(x); radescend(x)}} // better a misbranch than an atomic instruction if c<0. Could avoid recur check if AC>1
923
+
#defineraN(x,n) {I c=AC(x); if(likely(!ACISPERM(c))){if(c<0)AC(x)=(I)((UI)c+(ACINPLACE+(n)));else __atomic_fetch_add(&AC(x),(n),__ATOMIC_ACQ_REL); radescend(x)}} // add N to usecount all at once
923
924
#defineracontents(x) {I c=AC(x); if(MEMAUDIT!=0&&c<0)SEGFAULT; if(likely(!ACISPERM(c))){raincr(x); radescend(x)}} // Used on contents of box, which cannot have AC<0
924
925
#definerareccontents(x) {I c=AC(x); if(MEMAUDIT!=0&&c<0)SEGFAULT; if(likely(!ACISPERM(c))){raincr(x);}} // Used on contents of recursive box, which cannot have AC<0 and does not need recursion
925
926
#defineraname(x) {if(likely(!ACISPERM(AC(x))))raincr(x);} // NAME is not inplaceable, seldom local; just add 1. No traverse needed on ra
s=ca(s); if(!ISDENSETYPE(AT(a),FL))RZ(a=ccvt(FL,a,0)); // copy area we are going to change; put a in a form where we can recognize infinity
101
111
for(;i<AN(s);++i){if(DAV(a)[i]==IMIN)IAV(s)[i]=IMIN;elseif(INF(DAV(a)[i]))IAV(s)[i]=wcr?ws[wf+i]:1;} // kludge. The problem is which huge values to consider infinite. This is how it was done
112
+
// scaf what's this IMIN business? 32-bit? avoid all the conversions
0 commit comments