VTK-m  2.2
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
vtkm::VecFromPortal< PortalType > Class Template Reference

A short variable-length array from a window in an ArrayPortal. More...

#include <VecFromPortal.h>

Public Types

using ComponentType = typename std::remove_const< typename PortalType::ValueType >::type
 

Public Member Functions

 VecFromPortal (const PortalType &portal, vtkm::IdComponent numComponents=0, vtkm::Id offset=0)
 
vtkm::IdComponent GetNumberOfComponents () const
 
template<typename T , vtkm::IdComponent DestSize>
void CopyInto (vtkm::Vec< T, DestSize > &dest) const
 
template<vtkm::IdComponent N>
 operator vtkm::Vec< ComponentType, N > () const
 
vtkm::internal::ArrayPortalValueReference< PortalType > operator[] (vtkm::IdComponent index) const
 
template<typename OtherVecType >
VecFromPortaloperator= (const OtherVecType &src)
 
template<typename OtherVecType >
VecFromPortaloperator+= (const OtherVecType &other)
 
template<typename OtherVecType >
VecFromPortaloperator-= (const OtherVecType &other)
 
template<typename OtherVecType >
VecFromPortaloperator*= (const OtherVecType &other)
 
template<typename OtherVecType >
VecFromPortaloperator/= (const OtherVecType &other)
 
template<typename OtherVecType >
bool operator== (const OtherVecType &other)
 
template<typename OtherVecType >
bool operator!= (const OtherVecType &other)
 
const PortalType & GetPortal () const
 
vtkm::Id GetOffset () const
 

Private Member Functions

template<typename OtherVecType >
void Multiply (const OtherVecType &other, vtkm::TypeTraitsVectorTag)
 
template<typename ScalarType >
void Multiply (ScalarType other, vtkm::TypeTraitsScalarTag)
 

Private Attributes

PortalType Portal
 
vtkm::IdComponent NumComponents
 
vtkm::Id Offset
 

Detailed Description

template<typename PortalType>
class vtkm::VecFromPortal< PortalType >

A short variable-length array from a window in an ArrayPortal.

The VecFromPortal class is a Vec-like class that holds an array portal and exposes a small window of that portal as if it were a Vec.

Member Typedef Documentation

◆ ComponentType

template<typename PortalType >
using vtkm::VecFromPortal< PortalType >::ComponentType = typename std::remove_const<typename PortalType::ValueType>::type

Constructor & Destructor Documentation

◆ VecFromPortal()

template<typename PortalType >
vtkm::VecFromPortal< PortalType >::VecFromPortal ( const PortalType &  portal,
vtkm::IdComponent  numComponents = 0,
vtkm::Id  offset = 0 
)
inline

Member Function Documentation

◆ CopyInto()

template<typename PortalType >
template<typename T , vtkm::IdComponent DestSize>
void vtkm::VecFromPortal< PortalType >::CopyInto ( vtkm::Vec< T, DestSize > &  dest) const
inline

◆ GetNumberOfComponents()

template<typename PortalType >
vtkm::IdComponent vtkm::VecFromPortal< PortalType >::GetNumberOfComponents ( ) const
inline

◆ GetOffset()

template<typename PortalType >
vtkm::Id vtkm::VecFromPortal< PortalType >::GetOffset ( ) const
inline

◆ GetPortal()

template<typename PortalType >
const PortalType& vtkm::VecFromPortal< PortalType >::GetPortal ( ) const
inline

◆ Multiply() [1/2]

template<typename PortalType >
template<typename OtherVecType >
void vtkm::VecFromPortal< PortalType >::Multiply ( const OtherVecType &  other,
vtkm::TypeTraitsVectorTag   
)
inlineprivate

◆ Multiply() [2/2]

template<typename PortalType >
template<typename ScalarType >
void vtkm::VecFromPortal< PortalType >::Multiply ( ScalarType  other,
vtkm::TypeTraitsScalarTag   
)
inlineprivate

◆ operator vtkm::Vec< ComponentType, N >()

template<typename PortalType >
template<vtkm::IdComponent N>
vtkm::VecFromPortal< PortalType >::operator vtkm::Vec< ComponentType, N > ( ) const
inline

◆ operator!=()

template<typename PortalType >
template<typename OtherVecType >
bool vtkm::VecFromPortal< PortalType >::operator!= ( const OtherVecType &  other)
inline

◆ operator*=()

template<typename PortalType >
template<typename OtherVecType >
VecFromPortal& vtkm::VecFromPortal< PortalType >::operator*= ( const OtherVecType &  other)
inline

◆ operator+=()

template<typename PortalType >
template<typename OtherVecType >
VecFromPortal& vtkm::VecFromPortal< PortalType >::operator+= ( const OtherVecType &  other)
inline

◆ operator-=()

template<typename PortalType >
template<typename OtherVecType >
VecFromPortal& vtkm::VecFromPortal< PortalType >::operator-= ( const OtherVecType &  other)
inline

◆ operator/=()

template<typename PortalType >
template<typename OtherVecType >
VecFromPortal& vtkm::VecFromPortal< PortalType >::operator/= ( const OtherVecType &  other)
inline

◆ operator=()

template<typename PortalType >
template<typename OtherVecType >
VecFromPortal& vtkm::VecFromPortal< PortalType >::operator= ( const OtherVecType &  src)
inline

◆ operator==()

template<typename PortalType >
template<typename OtherVecType >
bool vtkm::VecFromPortal< PortalType >::operator== ( const OtherVecType &  other)
inline

◆ operator[]()

template<typename PortalType >
vtkm::internal::ArrayPortalValueReference<PortalType> vtkm::VecFromPortal< PortalType >::operator[] ( vtkm::IdComponent  index) const
inline

Member Data Documentation

◆ NumComponents

template<typename PortalType >
vtkm::IdComponent vtkm::VecFromPortal< PortalType >::NumComponents
private

◆ Offset

template<typename PortalType >
vtkm::Id vtkm::VecFromPortal< PortalType >::Offset
private

◆ Portal

template<typename PortalType >
PortalType vtkm::VecFromPortal< PortalType >::Portal
private

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