Span#

Fully qualified name: omni::graph::exec::unstable::Span

template<typename T>
class Span#

A pointer along with the number of items the pointer points to.

This object is ABI-safe and can be passed by pointer or value through the ABI.

Public Functions

inline Span(T *buffer, uint64_t count) noexcept#

Constructor.

inline T *begin() noexcept#

Returns a pointer to the beginning of the array.

inline const T *begin() const noexcept#

Returns a const pointer to the beginning of the array.

inline T *end() noexcept#

Returns a pointer to one past the end of the array.

inline const T *end() const noexcept#

Returns a const pointer to one past the end of the array.

inline bool empty() const noexcept#

Return true if the span is empty.

inline T &front() noexcept#

Returns a reference to the first element.

Calling when the span is empty is undefined behavior.

inline const T &front() const noexcept#

Returns a const reference to the first element.

Calling when the span is empty is undefined behavior.

inline T &back() noexcept#

Returns a reference to the last element.

Calling when the span is empty is undefined behavior.

inline const T &back() const noexcept#

Returns a const reference to the last element.

Calling when the span is empty is undefined behavior.

inline T *data() noexcept#

Returns a pointer to the beginning of the array.

inline const T *data() const noexcept#

Returns a pointer to the beginning of the array.

inline uint64_t size() const noexcept#

Returns the number of items in the array.