From 60fde9fa4770d057be6249a040b96863177cd166 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Thu, 22 Jan 2026 14:04:10 +0100 Subject: Adding flat_data return --- modules/codec/c++/data.hpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules') diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp index 4786af1..3122b4b 100644 --- a/modules/codec/c++/data.hpp +++ b/modules/codec/c++/data.hpp @@ -369,6 +369,13 @@ public: static constexpr data flat_dims() { return {ct_multiply::value}; } + + constexpr data* flat_data() { + if constexpr (flat_dims() == 0u) { + return nullptr; + } + return &value_[0u]; + } private: constexpr uint64_t get_flat_index(const data>& i) const { uint64_t s = 0; -- cgit v1.2.3