this looks recurrent,e.g. for scalar cells:
a1_new=a1*w1+a0*w2
a2=a2*w1+a1_new*w2

if I got the computation correctly, it is not parallelizable.
However outer loop should be vectorizable, as columns are independent. Basic idea is to convert indexes into a mask, in your case this means expanding w1 and w2 into 2d arrays, and masking by w1=1,w2=0. After that you should be able to process all columns at once.