I want to calculate $y^T \cdot \operatorname{diag}(A^T B A) \cdot y$.$$y^T \mbox{diag}(A^T B A) \,y$$ where
- $y$ is a $N \times 1$$n \times 1$ vector.
- $A$ is a $m \times N$$m \times n$ matrix where $N \gg m$$n \gg m$.
- $B$ is a $m \times m$ matrix, and B is a symmetric positive definite matrix,matrix; the Cholesky decomposition $B = LL^T$ is precomputed if it is needed.
Is it possible to calculate the above expression inat a cost of $O(Nm)$ complexity$O(m n)$ flops?