VTK-m  2.0
Public Types | Public Member Functions | Public Attributes | List of all members
vtkm::Pair< T1, T2 > Struct Template Reference

A vtkm::Pair is essentially the same as an STL pair object except that the methods (constructors and operators) are defined to work in both the control and execution environments (whereas std::pair is likely to work only in the control environment). More...

#include <Pair.h>

Public Types

using FirstType = T1
 The type of the first object. More...
 
using SecondType = T2
 The type of the second object. More...
 
using first_type = FirstType
 The same as FirstType, but follows the naming convention of std::pair. More...
 
using second_type = SecondType
 The same as SecondType, but follows the naming convention of std::pair. More...
 

Public Member Functions

 Pair ()=default
 
VTKM_EXEC_CONT Pair (const FirstType &firstSrc, const SecondType &secondSrc)
 
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT Pair (FirstType &&firstSrc, SecondType &&secondSrc) noexcept(noexcept(FirstType{ std::declval< FirstType && >() }, SecondType{ std::declval< SecondType && >() }))
 
 Pair (const Pair &)=default
 
 Pair (Pair &&)=default
 
template<typename U1 , typename U2 >
VTKM_EXEC_CONT Pair (const vtkm::Pair< U1, U2 > &src)
 
template<typename U1 , typename U2 >
VTKM_EXEC_CONT Pair (vtkm::Pair< U1, U2 > &&src) noexcept(noexcept(U1{ std::declval< U1 && >() }, U2{ std::declval< U2 && >() }))
 
template<typename U1 , typename U2 >
VTKM_EXEC_CONT Pair (const std::pair< U1, U2 > &src)
 
template<typename U1 , typename U2 >
VTKM_EXEC_CONT Pair (std::pair< U1, U2 > &&src) noexcept(noexcept(U1{ std::declval< U1 && >() }, U2{ std::declval< U2 && >() }))
 
vtkm::Pair< FirstType, SecondType > & operator= (const vtkm::Pair< FirstType, SecondType > &src)=default
 
vtkm::Pair< FirstType, SecondType > & operator= (vtkm::Pair< FirstType, SecondType > &&src)=default
 
VTKM_EXEC_CONT bool operator== (const vtkm::Pair< FirstType, SecondType > &other) const
 
VTKM_EXEC_CONT bool operator!= (const vtkm::Pair< FirstType, SecondType > &other) const
 
VTKM_EXEC_CONT bool operator< (const vtkm::Pair< FirstType, SecondType > &other) const
 Tests ordering on the first object, and then on the second object if the first are equal. More...
 
VTKM_EXEC_CONT bool operator> (const vtkm::Pair< FirstType, SecondType > &other) const
 Tests ordering on the first object, and then on the second object if the first are equal. More...
 
VTKM_EXEC_CONT bool operator<= (const vtkm::Pair< FirstType, SecondType > &other) const
 Tests ordering on the first object, and then on the second object if the first are equal. More...
 
VTKM_EXEC_CONT bool operator>= (const vtkm::Pair< FirstType, SecondType > &other) const
 Tests ordering on the first object, and then on the second object if the first are equal. More...
 

Public Attributes

FirstType first
 The pair's first object. More...
 
SecondType second
 The pair's second object. More...
 

Detailed Description

template<typename T1, typename T2>
struct vtkm::Pair< T1, T2 >

A vtkm::Pair is essentially the same as an STL pair object except that the methods (constructors and operators) are defined to work in both the control and execution environments (whereas std::pair is likely to work only in the control environment).

Member Typedef Documentation

◆ first_type

template<typename T1 , typename T2 >
using vtkm::Pair< T1, T2 >::first_type = FirstType

The same as FirstType, but follows the naming convention of std::pair.

◆ FirstType

template<typename T1 , typename T2 >
using vtkm::Pair< T1, T2 >::FirstType = T1

The type of the first object.

◆ second_type

template<typename T1 , typename T2 >
using vtkm::Pair< T1, T2 >::second_type = SecondType

The same as SecondType, but follows the naming convention of std::pair.

◆ SecondType

template<typename T1 , typename T2 >
using vtkm::Pair< T1, T2 >::SecondType = T2

The type of the second object.

Constructor & Destructor Documentation

◆ Pair() [1/9]

template<typename T1 , typename T2 >
vtkm::Pair< T1, T2 >::Pair ( )
default

◆ Pair() [2/9]

template<typename T1 , typename T2 >
VTKM_EXEC_CONT vtkm::Pair< T1, T2 >::Pair ( const FirstType firstSrc,
const SecondType secondSrc 
)
inline

◆ Pair() [3/9]

template<typename T1 , typename T2 >
VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT vtkm::Pair< T1, T2 >::Pair ( FirstType &&  firstSrc,
SecondType &&  secondSrc 
)
inlinenoexcept

◆ Pair() [4/9]

template<typename T1 , typename T2 >
vtkm::Pair< T1, T2 >::Pair ( const Pair< T1, T2 > &  )
default

◆ Pair() [5/9]

template<typename T1 , typename T2 >
vtkm::Pair< T1, T2 >::Pair ( Pair< T1, T2 > &&  )
default

◆ Pair() [6/9]

template<typename T1 , typename T2 >
template<typename U1 , typename U2 >
VTKM_EXEC_CONT vtkm::Pair< T1, T2 >::Pair ( const vtkm::Pair< U1, U2 > &  src)
inline

◆ Pair() [7/9]

template<typename T1 , typename T2 >
template<typename U1 , typename U2 >
VTKM_EXEC_CONT vtkm::Pair< T1, T2 >::Pair ( vtkm::Pair< U1, U2 > &&  src)
inlinenoexcept

◆ Pair() [8/9]

template<typename T1 , typename T2 >
template<typename U1 , typename U2 >
VTKM_EXEC_CONT vtkm::Pair< T1, T2 >::Pair ( const std::pair< U1, U2 > &  src)
inline

◆ Pair() [9/9]

template<typename T1 , typename T2 >
template<typename U1 , typename U2 >
VTKM_EXEC_CONT vtkm::Pair< T1, T2 >::Pair ( std::pair< U1, U2 > &&  src)
inlinenoexcept

Member Function Documentation

◆ operator!=()

template<typename T1 , typename T2 >
VTKM_EXEC_CONT bool vtkm::Pair< T1, T2 >::operator!= ( const vtkm::Pair< FirstType, SecondType > &  other) const
inline

◆ operator<()

template<typename T1 , typename T2 >
VTKM_EXEC_CONT bool vtkm::Pair< T1, T2 >::operator< ( const vtkm::Pair< FirstType, SecondType > &  other) const
inline

Tests ordering on the first object, and then on the second object if the first are equal.

◆ operator<=()

template<typename T1 , typename T2 >
VTKM_EXEC_CONT bool vtkm::Pair< T1, T2 >::operator<= ( const vtkm::Pair< FirstType, SecondType > &  other) const
inline

Tests ordering on the first object, and then on the second object if the first are equal.

◆ operator=() [1/2]

template<typename T1 , typename T2 >
vtkm::Pair<FirstType, SecondType>& vtkm::Pair< T1, T2 >::operator= ( const vtkm::Pair< FirstType, SecondType > &  src)
default

◆ operator=() [2/2]

template<typename T1 , typename T2 >
vtkm::Pair<FirstType, SecondType>& vtkm::Pair< T1, T2 >::operator= ( vtkm::Pair< FirstType, SecondType > &&  src)
default

◆ operator==()

template<typename T1 , typename T2 >
VTKM_EXEC_CONT bool vtkm::Pair< T1, T2 >::operator== ( const vtkm::Pair< FirstType, SecondType > &  other) const
inline

◆ operator>()

template<typename T1 , typename T2 >
VTKM_EXEC_CONT bool vtkm::Pair< T1, T2 >::operator> ( const vtkm::Pair< FirstType, SecondType > &  other) const
inline

Tests ordering on the first object, and then on the second object if the first are equal.

◆ operator>=()

template<typename T1 , typename T2 >
VTKM_EXEC_CONT bool vtkm::Pair< T1, T2 >::operator>= ( const vtkm::Pair< FirstType, SecondType > &  other) const
inline

Tests ordering on the first object, and then on the second object if the first are equal.

Member Data Documentation

◆ first

template<typename T1 , typename T2 >
FirstType vtkm::Pair< T1, T2 >::first

The pair's first object.

Note that this field breaks VTK-m's naming conventions to make vtkm::Pair more compatible with std::pair.

◆ second

template<typename T1 , typename T2 >
SecondType vtkm::Pair< T1, T2 >::second

The pair's second object.

Note that this field breaks VTK-m's naming conventions to make vtkm::Pair more compatible with std::pair.


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