OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
FSlice< T, S > Class Template Reference

An iterator permitting to iterate with a stride different from 1. More...

#include <FSlice.h>

Inheritance diagram for FSlice< T, S >:
Collaboration diagram for FSlice< T, S >:

Public Types

typedef std::random_access_iterator_tag iterator_category
 The iterator tag, taken from the standard template library.
typedef T value_type
 The value type.
typedef std::ptrdiff_t difference_type
 The pointer difference type.
typedef T * pointer
 The pointer type.
typedef T & reference
 The reference type.

Public Member Functions

 FSlice (T *)
 Constructor for array.
 FSlice (const FSlice &)
FSliceoperator= (const FSlice &)
bool operator== (const FSlice &rhs) const
bool operator!= (const FSlice &rhs) const
FSliceoperator++ ()
 Increment (iterate forward).
FSlice operator++ (int)
 Increment (iterate forward).
FSliceoperator-- ()
 Decrement (iterate backward).
FSlice operator-- (int)
 Decrement (iterate backward).
FSliceoperator+= (std::ptrdiff_t)
 Increment by multiple stride.
FSliceoperator-= (std::ptrdiff_t)
 Decrement by multiple stride.
FSlice operator+ (std::ptrdiff_t)
 Add multiple stride.
FSlice operator- (std::ptrdiff_t)
 Subtract multiple stride.
difference_type operator- (const FSlice &) const
 Difference.
T & operator* () const
 Dereference.
T & operator[] (int) const
 Delegate.

Private Attributes

T * cursor

Detailed Description

template<class T, int S>
class FSlice< T, S >

An iterator permitting to iterate with a stride different from 1.

Definition at line 30 of file FSlice.h.

Member Typedef Documentation

◆ difference_type

template<class T, int S>
typedef std::ptrdiff_t FSlice< T, S >::difference_type

The pointer difference type.

Definition at line 41 of file FSlice.h.

◆ iterator_category

template<class T, int S>
typedef std::random_access_iterator_tag FSlice< T, S >::iterator_category

The iterator tag, taken from the standard template library.

Definition at line 35 of file FSlice.h.

◆ pointer

template<class T, int S>
typedef T* FSlice< T, S >::pointer

The pointer type.

Definition at line 44 of file FSlice.h.

◆ reference

template<class T, int S>
typedef T& FSlice< T, S >::reference

The reference type.

Definition at line 47 of file FSlice.h.

◆ value_type

template<class T, int S>
typedef T FSlice< T, S >::value_type

The value type.

Definition at line 38 of file FSlice.h.

Constructor & Destructor Documentation

◆ FSlice() [1/2]

template<class T, int S>
FSlice< T, S >::FSlice ( T * array)
inlineexplicit

Constructor for array.

Definition at line 197 of file FSlice.h.

References cursor.

Referenced by FSlice(), operator!=(), operator+(), operator++(), operator++(), operator+=(), operator-(), operator-(), operator--(), operator--(), operator-=(), operator=(), and operator==().

◆ FSlice() [2/2]

template<class T, int S>
FSlice< T, S >::FSlice ( const FSlice< T, S > & rhs)
inline

Definition at line 202 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

Member Function Documentation

◆ operator!=()

template<class T, int S>
bool FSlice< T, S >::operator!= ( const FSlice< T, S > & rhs) const
inline

Definition at line 218 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator*()

template<class T, int S>
T & FSlice< T, S >::operator* ( ) const
inline

Dereference.

Definition at line 279 of file FSlice.h.

References cursor.

◆ operator+()

template<class T, int S>
FSlice< T, S > FSlice< T, S >::operator+ ( std::ptrdiff_t n)
inline

Add multiple stride.

Definition at line 261 of file FSlice.h.

References FSlice().

Here is the call graph for this function:

◆ operator++() [1/2]

template<class T, int S>
FSlice< T, S > & FSlice< T, S >::operator++ ( )
inline

Increment (iterate forward).

Definition at line 223 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator++() [2/2]

template<class T, int S>
FSlice< T, S > FSlice< T, S >::operator++ ( int )
inline

Increment (iterate forward).

Definition at line 229 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator+=()

template<class T, int S>
FSlice< T, S > & FSlice< T, S >::operator+= ( std::ptrdiff_t n)
inline

Increment by multiple stride.

Definition at line 249 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator-() [1/2]

template<class T, int S>
FSlice< T, S >::difference_type FSlice< T, S >::operator- ( const FSlice< T, S > & rhs) const
inline

Difference.

Definition at line 274 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator-() [2/2]

template<class T, int S>
FSlice< T, S > FSlice< T, S >::operator- ( std::ptrdiff_t n)
inline

Subtract multiple stride.

Definition at line 267 of file FSlice.h.

References FSlice().

Here is the call graph for this function:

◆ operator--() [1/2]

template<class T, int S>
FSlice< T, S > & FSlice< T, S >::operator-- ( )
inline

Decrement (iterate backward).

Definition at line 236 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator--() [2/2]

template<class T, int S>
FSlice< T, S > FSlice< T, S >::operator-- ( int )
inline

Decrement (iterate backward).

Definition at line 242 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator-=()

template<class T, int S>
FSlice< T, S > & FSlice< T, S >::operator-= ( std::ptrdiff_t n)
inline

Decrement by multiple stride.

Definition at line 255 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator=()

template<class T, int S>
FSlice< T, S > & FSlice< T, S >::operator= ( const FSlice< T, S > & rhs)
inline

Definition at line 207 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator==()

template<class T, int S>
bool FSlice< T, S >::operator== ( const FSlice< T, S > & rhs) const
inline

Definition at line 213 of file FSlice.h.

References cursor, and FSlice().

Here is the call graph for this function:

◆ operator[]()

template<class T, int S>
T & FSlice< T, S >::operator[] ( int n) const
inline

Delegate.

Definition at line 284 of file FSlice.h.

References cursor.

Member Data Documentation

◆ cursor

template<class T, int S>
T* FSlice< T, S >::cursor
private

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