diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-10-20 10:22:52 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-10-20 10:22:52 +0200 |
| commit | 56bf0107ae25c20d1044356472738e4b28e4151c (patch) | |
| tree | 0692dd36df9f7e5ff957d17b8b50845948aca828 | |
| parent | e377859084dfeb254451ac97d01c1272a321dc10 (diff) | |
| download | forstio-forstio-56bf0107ae25c20d1044356472738e4b28e4151c.tar.gz | |
Added internal access to data
| -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 { |
