| 14 | namespace impl { |
| 15 | |
| 16 | class std_span_array_nd |
| 17 | { |
| 18 | public: |
| 19 | std_span_array_nd(std::shared_ptr<void> owner, std::span<const uint8_t> data, icm::shape shape, dtype dt) |
| 20 | : owner_(std::move(owner)) |
| 21 | , data_(data) |
| 22 | , shape_(std::move(shape)) |
| 23 | , dtype_(dt) |
| 24 | { |
| 25 | } |
| 26 | |
| 27 | inline enum dtype dtype() const |
| 28 | { |
| 29 | return dtype_; |
| 30 | } |
| 31 | |
| 32 | inline std::span<const uint8_t> data() const |
| 33 | { |
| 34 | return data_; |
| 35 | } |
| 36 | |
| 37 | inline const std::shared_ptr<void>& owner() const |
| 38 | { |
| 39 | return owner_; |
| 40 | } |
| 41 | |
| 42 | inline const icm::shape& shape() const |
| 43 | { |
| 44 | return shape_; |
| 45 | } |
| 46 | |
| 47 | constexpr bool is_dynamic() const noexcept |
| 48 | { |
| 49 | return false; |
| 50 | } |
| 51 | |
| 52 | private: |
| 53 | const std::shared_ptr<void> owner_; |
| 54 | const std::span<const uint8_t> data_; |
| 55 | const icm::shape shape_; |
| 56 | const enum dtype dtype_; |
| 57 | }; |
| 58 | |
| 59 | } // namespace impl |
| 60 |
no outgoing calls
no test coverage detected