
Re: Efficiently computing large numbers of vector norms
Posted:
Nov 13, 2012 1:22 PM


> It would be interesting to know the data dimensions you're working with. For my tests, I had:
N1 = 3; N2 = 4; Q1 = 180; Q2 = 63;
If I increase N1 and/or N2, the improvement (due to KronProd) decreases.
For more complicated cases, I can't see how to use KronProd at all. In particular, when there is elementbyelement multiplication, e.g.:
kron(kron(A1(:,i),A2(:,i).*A3(:,j)),A4(:,j))'*X3
That is, A1 and A2 'belong' to the same loop and, similarly, A3 and A4 belong together to a different loop. However, A2(:,i).*A3(:,j) mixes the two and I can't see how to deal with it!

