RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
Classes | Public Member Functions | List of all members
RAJA::RepeatView< T > Struct Template Reference

A view of a single object repeated a certain number of times. More...

#include <RepeatView.hpp>

Classes

struct  iterator
 

Public Member Functions

 RepeatView ()=delete
 
constexpr RepeatView (T const &value, size_t bound)
 
constexpr RepeatView (T &&value, size_t bound)
 
constexpr T const & front () const
 
constexpr T const & back () const
 
constexpr T const & operator[] (size_t RAJA_UNUSED_ARG(index)) const
 
constexpr iterator begin () const
 
constexpr iterator cbegin () const
 
constexpr iterator end () const
 
constexpr iterator cend () const
 
constexpr operator bool () const
 
constexpr bool empty () const
 
constexpr size_t size () const
 

Detailed Description

template<typename T>
struct RAJA::RepeatView< T >

A view of a single object repeated a certain number of times.

Creates a view or container object given an object and length. Allows use of container interface functions if you want to repeat a single object.

For example:

// Create a repeat view object for the int 2 repeated int_len times
RepeatView<int> int_repeated(2, int_len);

// Use with RAJA for_each
RAJA::for_each(int_repeated, [&](int val) {
  sum += val;
});

Based on the std::ranges::repeat_view template. Differs in that it does not support: compile time extents unbounded extents

Constructor & Destructor Documentation

◆ RepeatView() [1/3]

template<typename T >
RAJA::RepeatView< T >::RepeatView ( )
delete

◆ RepeatView() [2/3]

template<typename T >
constexpr RAJA::RepeatView< T >::RepeatView ( T const &  value,
size_t  bound 
)
inlineconstexpr

◆ RepeatView() [3/3]

template<typename T >
constexpr RAJA::RepeatView< T >::RepeatView ( T &&  value,
size_t  bound 
)
inlineconstexpr

Member Function Documentation

◆ front()

template<typename T >
constexpr T const& RAJA::RepeatView< T >::front ( ) const
inlineconstexpr

◆ back()

template<typename T >
constexpr T const& RAJA::RepeatView< T >::back ( ) const
inlineconstexpr

◆ operator[]()

template<typename T >
constexpr T const& RAJA::RepeatView< T >::operator[] ( size_t   RAJA_UNUSED_ARGindex) const
inlineconstexpr

◆ begin()

template<typename T >
constexpr iterator RAJA::RepeatView< T >::begin ( ) const
inlineconstexpr

◆ cbegin()

template<typename T >
constexpr iterator RAJA::RepeatView< T >::cbegin ( ) const
inlineconstexpr

◆ end()

template<typename T >
constexpr iterator RAJA::RepeatView< T >::end ( ) const
inlineconstexpr

◆ cend()

template<typename T >
constexpr iterator RAJA::RepeatView< T >::cend ( ) const
inlineconstexpr

◆ operator bool()

template<typename T >
constexpr RAJA::RepeatView< T >::operator bool ( ) const
inlineexplicitconstexpr

◆ empty()

template<typename T >
constexpr bool RAJA::RepeatView< T >::empty ( ) const
inlineconstexpr

◆ size()

template<typename T >
constexpr size_t RAJA::RepeatView< T >::size ( ) const
inlineconstexpr

The documentation for this struct was generated from the following file: