diff options
| -rw-r--r-- | modules/codec/c++/data.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/codec/c++/data.hpp b/modules/codec/c++/data.hpp index 013b475..18b7b27 100644 --- a/modules/codec/c++/data.hpp +++ b/modules/codec/c++/data.hpp @@ -760,6 +760,23 @@ class data<schema::Array<T,Dim>, encode::Native> { return {dims_}; } + /** + * + */ + data<schema::UInt64, encode::Native> internal_size() const { + return {value_.size()}; + } + + /** + * Available for contiguous encodings + */ + data<T, encode::Native>* internal_data() { + if(value_.size() == 0u){ + return nullptr; + } + return &value_[0u]; + } + private: template<typename U> uint64_t get_flat_index(const U& i) const { |
