DPNP C++ backend kernel library 0.18.0dev0
Data Parallel Extension for NumPy*
Loading...
Searching...
No Matches
DPNP_USM_iterator< _Tp > Class Template Referencefinal

Iterator for DPNPC_id type. More...

#include <dpnp_iterator.hpp>

Public Types

using value_type = _Tp
 
using difference_type = std::ptrdiff_t
 
using iterator_category = std::random_access_iterator_tag
 
using pointer = value_type *
 
using reference = value_type &
 
using size_type = shape_elem_type
 

Public Member Functions

 DPNP_USM_iterator (pointer __base_ptr, size_type __id, const size_type *__shape_stride=nullptr, const size_type *__axes_stride=nullptr, size_type __shape_size=0)
 
reference operator* () const
 
pointer operator-> () const
 
DPNP_USM_iteratoroperator++ ()
 prefix increment
 
DPNP_USM_iterator operator++ (int)
 postfix increment
 
bool operator== (const DPNP_USM_iterator &__rhs) const
 
bool operator!= (const DPNP_USM_iterator &__rhs) const
 
bool operator< (const DPNP_USM_iterator &__rhs) const
 
reference operator[] (size_type __n) const
 
difference_type operator- (const DPNP_USM_iterator &__rhs) const
 

Friends

std::ostream & operator<< (std::ostream &__out, const DPNP_USM_iterator &__it)
 Print this container in human readable form in error reporting.
 

Detailed Description

template<typename _Tp>
class DPNP_USM_iterator< _Tp >

Iterator for DPNPC_id type.

This type should be used to simplify data iteration over input with parameters "[axis|axes]" It is designed to be used in SYCL environment

Definition at line 49 of file dpnp_iterator.hpp.

Member Typedef Documentation

◆ difference_type

template<typename _Tp >
using DPNP_USM_iterator< _Tp >::difference_type = std::ptrdiff_t

Definition at line 53 of file dpnp_iterator.hpp.

◆ iterator_category

template<typename _Tp >
using DPNP_USM_iterator< _Tp >::iterator_category = std::random_access_iterator_tag

Definition at line 54 of file dpnp_iterator.hpp.

◆ pointer

template<typename _Tp >
using DPNP_USM_iterator< _Tp >::pointer = value_type *

Definition at line 55 of file dpnp_iterator.hpp.

◆ reference

template<typename _Tp >
using DPNP_USM_iterator< _Tp >::reference = value_type &

Definition at line 56 of file dpnp_iterator.hpp.

◆ size_type

template<typename _Tp >
using DPNP_USM_iterator< _Tp >::size_type = shape_elem_type

Definition at line 57 of file dpnp_iterator.hpp.

◆ value_type

template<typename _Tp >
using DPNP_USM_iterator< _Tp >::value_type = _Tp

Definition at line 52 of file dpnp_iterator.hpp.

Constructor & Destructor Documentation

◆ DPNP_USM_iterator()

template<typename _Tp >
DPNP_USM_iterator< _Tp >::DPNP_USM_iterator ( pointer __base_ptr,
size_type __id,
const size_type * __shape_stride = nullptr,
const size_type * __axes_stride = nullptr,
size_type __shape_size = 0 )
inline

Definition at line 59 of file dpnp_iterator.hpp.

Member Function Documentation

◆ operator!=()

template<typename _Tp >
bool DPNP_USM_iterator< _Tp >::operator!= ( const DPNP_USM_iterator< _Tp > & __rhs) const
inline

Definition at line 106 of file dpnp_iterator.hpp.

◆ operator*()

template<typename _Tp >
reference DPNP_USM_iterator< _Tp >::operator* ( ) const
inline

Definition at line 72 of file dpnp_iterator.hpp.

◆ operator++() [1/2]

template<typename _Tp >
DPNP_USM_iterator & DPNP_USM_iterator< _Tp >::operator++ ( )
inline

prefix increment

Definition at line 83 of file dpnp_iterator.hpp.

◆ operator++() [2/2]

template<typename _Tp >
DPNP_USM_iterator DPNP_USM_iterator< _Tp >::operator++ ( int )
inline

postfix increment

Definition at line 91 of file dpnp_iterator.hpp.

◆ operator-()

template<typename _Tp >
difference_type DPNP_USM_iterator< _Tp >::operator- ( const DPNP_USM_iterator< _Tp > & __rhs) const
inline

Definition at line 124 of file dpnp_iterator.hpp.

◆ operator->()

template<typename _Tp >
pointer DPNP_USM_iterator< _Tp >::operator-> ( ) const
inline

Definition at line 77 of file dpnp_iterator.hpp.

◆ operator<()

template<typename _Tp >
bool DPNP_USM_iterator< _Tp >::operator< ( const DPNP_USM_iterator< _Tp > & __rhs) const
inline

Definition at line 111 of file dpnp_iterator.hpp.

◆ operator==()

template<typename _Tp >
bool DPNP_USM_iterator< _Tp >::operator== ( const DPNP_USM_iterator< _Tp > & __rhs) const
inline

Definition at line 99 of file dpnp_iterator.hpp.

◆ operator[]()

template<typename _Tp >
reference DPNP_USM_iterator< _Tp >::operator[] ( size_type __n) const
inline

Definition at line 119 of file dpnp_iterator.hpp.

Friends And Related Symbol Documentation

◆ operator<<

template<typename _Tp >
std::ostream & operator<< ( std::ostream & __out,
const DPNP_USM_iterator< _Tp > & __it )
friend

Print this container in human readable form in error reporting.

Definition at line 133 of file dpnp_iterator.hpp.


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