| 1794 | |
| 1795 | template <typename Scalar> |
| 1796 | int StorageSize(const Matrix<Scalar>& matrix) { |
| 1797 | return sizeof(Scalar) * FlatSize(matrix.layout); |
| 1798 | } |
| 1799 | |
| 1800 | // Helper that replicates a buffer and gives out pointers to the replicas. |
| 1801 | // This is useful when one wants to traverse data so that it is cold in cache. |