! * \brief whether given tensor span is valid in this storage */
| 128 | * \brief whether given tensor span is valid in this storage |
| 129 | */ |
| 130 | bool valid_span(const TensorLayout::Span& span) const { |
| 131 | return m_comp_node.valid() && |
| 132 | static_cast<ptrdiff_t>(m_offset) + span.low_byte >= 0 && |
| 133 | span.high_byte <= size(); |
| 134 | } |
| 135 | |
| 136 | /*! |
| 137 | * \brief ensure that its space could hold at least sz bytes |
no test coverage detected