Viskores  1.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
viskores::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, viskores::IdComponent numComponents=0, viskores::Id offset=0)
 
viskores::IdComponent GetNumberOfComponents () const
 
template<typename T , viskores::IdComponent DestSize>
void CopyInto (viskores::Vec< T, DestSize > &dest) const
 
template<viskores::IdComponent N>
 operator viskores::Vec< ComponentType, N > () const
 
viskores::internal::ArrayPortalValueReference< PortalType > operator[] (viskores::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
 
viskores::Id GetOffset () const
 

Private Member Functions

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

Private Attributes

PortalType Portal
 
viskores::IdComponent NumComponents
 
viskores::Id Offset
 

Detailed Description

template<typename PortalType>
class viskores::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 viskores::VecFromPortal< PortalType >::ComponentType = typename std::remove_const<typename PortalType::ValueType>::type

Constructor & Destructor Documentation

◆ VecFromPortal()

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

Member Function Documentation

◆ CopyInto()

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

◆ GetNumberOfComponents()

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

◆ GetOffset()

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

◆ GetPortal()

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

◆ Multiply() [1/2]

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

◆ Multiply() [2/2]

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

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

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

◆ operator!=()

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

◆ operator*=()

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

◆ operator+=()

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

◆ operator-=()

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

◆ operator/=()

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

◆ operator=()

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

◆ operator==()

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

◆ operator[]()

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

Member Data Documentation

◆ NumComponents

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

◆ Offset

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

◆ Portal

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

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