[Matrix]: reduce overhead of converting matrix layout.
[Matrix]: reduce overhead of converting matrix layout.

This is to optimize a matrix with a single row or column.

flashxio/FlashX,flashxio/FlashX,flashxio/FlashX,icoming/FlashGraph,icoming/FlashX,zheng-da/FlashX,flashxio/FlashX,icoming/FlashGraph,icoming/FlashGraph,icoming/FlashGraph,flashxio/FlashX,icoming/FlashX,icoming/FlashX,zheng-da/FlashX,icoming/FlashX,icoming/FlashX,zheng-da/FlashX,flashxio/FlashX,zheng-da/FlashX,zheng-da/FlashX,icoming/FlashGraph