This should be quite simple. As you say yourself, you can make Eigen aware of the fact that your matrix is a symmetric matrix through the SelfAdjointView. There is also another view, which is the TriangularView, which you can use to store your results. According to the reference if you assign to a TriangularView, only the relevant parts of the rhs are evaluated. So
B.triangularView<Upper>() = A * S.selfadjointView<Upper>() * A.transpose();
will store the result in the upper triangle of B. You can then use B.selfadjointView<Upper>
in any further calculations. I am not sure if this is optimal in terms of required operations and you might do some benchmarking to verify.