Shortcuts

Template Class StridedStorageView< Type >

Inheritance Relationships

Base Type

Class Documentation

template<typename Type>
class ripple::StridedStorageView<Type> : public ripple::StorageAccessor<StridedStorageView<Type>>

Specialization for strided storage for a single type.

The data for this class is stided in that each element of a multi-element type his offset by the stride of the zero dimension, which is the number of elements in the zero dimension, including padding.

Template Parameters
  • Type: The underlysing type to create a storage view for.

Public Functions

StridedStorageView() = default

Default constructor for the strided storage.

template<typename Impl>
StridedStorageView(const StorageAccessor<Impl> &other) noexcept

Constructor to set the strided storage from another StorageAccessor with a different layout.

Parameters
  • other: The accessor to set this storage from.

Template Parameters

StridedStorageView(const StridedStorageView &other) noexcept

Copy constructor to set the strided storage from the other storage.

Parameters
  • other: The other storage to set this one from.

StridedStorageView(StridedStorageView &&other) noexcept

Move constructor to move the other storage into this one.

Parameters
  • other: The other storage to move into this one.

template<typename Impl>
auto operator=(const StorageAccessor<Impl> &other) noexcept -> StridedStorageView&

Overload of assignment operator to set the data for the StridedStorageView from another StorageAccessor.

Return

A reference to the created storage view.

Parameters
  • other: The accessor to copy the data from.

Template Parameters

auto operator=(const StridedStorageView &other) noexcept -> StridedStorageView&

Overload of assignment operator to set the data for the StridedStorageView from another StridedStorageView.

Return

A reference to the created storage view.

Parameters
  • other: The strided storage to copy from.

auto operator=(StridedStorageView &&other) noexcept -> StridedStorageView&

Overload of move assignment operator to move the other strided view into this one.

Return

A reference to the created storage view.

Parameters
  • other: The strided storage to move from.

auto data() noexcept -> Ptr

Gets a pointer to the data for the storage.

Return

A pointer to the data for the storage.

auto data() const noexcept -> ConstPtr

Gets a const pointer to the data.

Return

A const pointer to the data for the storage.

auto data_ptrs() noexcept -> std::vector<Ptr>

Returns a reference to the data pointers for the storage.

template<typename Other>
auto copy(const Other &other) noexcept -> void

Copies the data from the other type.

Note

If the other type is not a StorageAccessor, this will cause a compile time error.

Parameters
  • other: The other storage to copy from.

Template Parameters
  • Other: The type of the other storage to copy from.

template<size_t I>
constexpr auto components_of() const noexcept -> size_t

Returns the number of components in the Ith type being stored.

For non-indexable types this will always return 1, otherwise will return the number of possible components which can be indexed.

Return

The number of components in the Ith type.

Template Parameters
  • I: The index of the type to get the number of components for.

template<size_t I, typename T = nth_element_t<I, Type>, non_vec_element_enable_t<T> = 0>
auto get() noexcept -> ValueType&

Gets a reference to the Ith data type.

Return

A reference to the Ith element.

Template Parameters
  • I: The index of the type to get the data from.

template<size_t I, typename T = nth_element_t<I, Type>, non_vec_element_enable_t<T> = 0>
auto get() const noexcept -> const ValueType&

Gets a const reference to the Ith data type.

Return

A const reference to the Ith element.

Template Parameters
  • I: The index of the type to get the data from.

template<size_t I, size_t J, vec_element_enable_t<Type> = 0>
auto get() noexcept -> ValueType&

Gets a reference to the Jth element of the Ith data type, if the Ith type is indexable.

Return

A reference to the Jth element in the Ith type.

Template Parameters
  • I: The index of the type to get the data from.

  • J: The index in the type to get.

template<size_t I, size_t J, vec_element_enable_t<Type> = 0>
auto get() const noexcept -> const ValueType&

Gets a const reference to the Jth element of the Ith data type, if the Ith type is indexable.

Return

A const reference to the Jth element of the Ith type.

Template Parameters
  • I: The index of the type to get the data from.

  • J: The index in the type to get.

template<size_t I, vec_element_enable_t<Type> = 0>
auto get(size_t j) noexcept -> ValueType&

Gets a reference to the jth element of the Ith data type, if the Ith type is indexable.

Return

A reference to the jth element of the Ith type.

Parameters
  • j: The index of the component in the type to get.

Template Parameters
  • I: The index of the type to get the data from.

template<size_t I, vec_element_enable_t<Type> = 0>
auto get(size_t j) const noexcept -> const ValueType&

Gets a const reference to the jth element of the Ith data type, if the Ith type is indexable.

Return

A const reference to the jth element of the Ith type.

Parameters
  • j: The index of the component in the type to get.

Template Parameters
  • I: The index of the type to get the data from.

  • T: The type of the Ith element.

Docs

Access comprehensive developer documentation for Ripple

View Docs

Tutorials

Get tutorials to help with understand all features

View Tutorials

Examples

Find examples to help get started

View Examples