class ngraph::runtime::reference::Span¶
Overview¶
Span should mimic std::span. More…
#include <span.hpp>
template <typename Element>
class Span
{
public:
// typedefs
typedef Element value_type;
typedef std::size_t size_type;
// construction
Span();
Span(Element \* data, std::size_t size);
// methods
constexpr Element \* begin() const;
constexpr Element \* end() const;
constexpr std::size_t size() const;
constexpr bool empty() const;
constexpr Element& front() const;
constexpr Element& back() const;
constexpr Element& operator [] (std::size_t idx) const;
Element& at(std::size_t idx) const;
Span subspan(
std::size_t offset,
std::size_t size = std::numeric_limits<std::size_t>::max()
) const;
Span& drop_front(std::size_t number_of_elements);
Span& drop_back(std::size_t number_of_elements);
};
Detailed Documentation¶
Span should mimic std::span.
Methods¶
Span subspan(
std::size_t offset,
std::size_t size = std::numeric_limits<std::size_t>::max()
) const
return sub part of span starting from offset and not greater than size
Span& drop_front(std::size_t number_of_elements)
drop number of elements from front
Span& drop_back(std::size_t number_of_elements)
drop number of elements from back