Rescaling in CKKS implementation and SwitchFormat

Hello, I happened to be looking into the rescaling operation implementation in OpenFHE as I am trying to understand the algorithm.

One thing I’ve noticed is that it seems to change the limb representation to the coefficient format before doing some scalar products. As far as I can tell, scalar product can be done on both representations, so I was wondering why it is done this way.

I’m talking about “core/include/lattice/hal/default/dcrtpoly-impl.h:715” “DropLastElementAndScale” function.

I made a little diagram of what I think would be an equivalent implementation that would use less representation conversions:

Does this make sense? If so, is there a reason for the implementation to be that way?

Thank you for your help,
Carlos.