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
PROD(m,wf,s); PROD(d,wr-wf-1,s+wf+1); SETICFR(w,wf,wcr,n); // m=#cells of w, n=#items per cell d=#atoms per item of cell
146
146
rot(m,d,n,k,1>=p?AN(a):1L,av,u,v); // rotate first axis
147
-
if(1<p){
148
-
// more than 1 axis: we ping-pong between buffers as we go down the axes
149
-
GA(y,AT(w),wn,wr,s); u=CAV(y); // scaf not needed if there is fill
150
-
b=0; s+=wf;
151
-
DO(p-1, m*=n; n=*++s; PROD(d,wr-wf-i-2,s+1); rot(m,d,n,k,1L,av+i+1,b?u:v,b?v:u); b^=1;); // s has moved past the frame
152
-
z=b?y:z;
147
+
if(1<p){Ay=z;
148
+
// more than 1 axis: we ping-pong between buffers as we go down the axes.
149
+
// Start here with input in z/v; put output in y/u so result will be in z at end of loop
150
+
if(!jt->fill)GA(y,AT(w),wn,wr,s); C*u=CAV(y); // if fill, z is always inplaceable and we keep using it
151
+
// obsolete b=0;
152
+
s+=wf; // skip over w frame to get to the cell. We will start 1 axis in
153
+
// obsolete DO(p-1, m*=n; n=*++s; PROD(d,wr-wf-i-2,s+1); rot(m,d,n,k,1L,av+i+1,b?u:v,b?v:u); b^=1;); // s has moved past the frame
154
+
DO(p-1, m*=n; n=*++s; Ata=z; z=y; y=ta; C*ct=u; u=v; v=ct; PROD(d,wr-wf-i-2,s+1); rot(m,d,n,k,1L,av+i+1,u,v);); // do axes, with ping-pong, leaving result in z/v
155
+
// obsolete z=b?y:z;
153
156
}
154
157
// w is going to be replaced. That makes it non-pristine; but if it is inplaceable it can pass its pristinity to the result, as long as there is no fill
155
158
PRISTXFERFIF(z,origw,jt->fill==0) // transfer pristinity if there is no fill
0 commit comments