diff options
Diffstat (limited to 'modules/codec')
| -rw-r--r-- | modules/codec/c++/data.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp index 585501b..a06acdf 100644 --- a/modules/codec/c++/data.hpp +++ b/modules/codec/c++/data.hpp @@ -365,6 +365,10 @@ public: constexpr data<schema::FixedArray<schema::UInt64, sizeof...(D)>> get_dims() const { return {std::array<uint64_t, sizeof...(D)>{D...}}; } + + constexpr data<schema::UInt64> flat_dims() const { + return {ct_multiply<uint64_t, D...>::value}; + } private: constexpr uint64_t get_flat_index(const data<schema::FixedArray<schema::UInt64, sizeof...(D)>>& i) const { uint64_t s = 0; |
