Suppose a matrix $A_k$ is a symmetric positive definite real matrix. As $k$ increases, $A_k$ may change but will always be symmetric positive definite. What I want to do is to have an operation $f:\mathbb{R}^{n\times n}\rightarrow\mathbb{R}^{n\times n}$ on this matrix $A_k$ such that $f(A_k)\preceq B$. Note that when $A_k$ and $B$ are incomparable, the operation $f$ will also make sure that $f(A_k)\preceq B$. We can assume that $B$ is a simple matrix like $c I$, where $c>0$.
Is there a non-conservative and (hopefully) efficient way to do this? By non-conservative, I mean I want the matrix $A_k$ to change as little as possible.
One possible way to do it is to do a matrix refactorization, $A_k = Q_k\Lambda_k Q_k^\top$, and change the eigenvalues in $\Lambda_k$ to make it upper bounded by the matrix $B$. But apparently that's not efficient.