SPH
Public Member Functions | Static Public Member Functions | Friends | List of all members
Indices Class Reference

Helper object for storing three (possibly four) int or bool values. More...

#include <Indices.h>

Public Member Functions

INLINE Indices ()=default
 
INLINE Indices (__m128i i)
 
INLINE Indices (const int value)
 Constructs indices from single value by copying it to all components. More...
 
INLINE Indices (const int i, const int j, const int k, const int l=0)
 Constructs indices from values. Fourth component is optional. More...
 
INLINE Indices (const BasicVector< float > &v)
 Constructs indices by casting components of vectors to ints. More...
 
INLINE Indices (const BasicVector< double > &v)
 
INLINE Indices (const Indices &other)
 
INLINE Indicesoperator= (const Indices &other)
 
INLINE operator BasicVector< float > () const
 
INLINE operator BasicVector< double > () const
 
INLINE int & operator[] (const int idx)
 
INLINE int operator[] (const int idx) const
 
INLINE Indices operator== (const Indices &other) const
 
INLINE Indices operator!= (const Indices &other)
 
INLINE Indices operator> (const Indices &other) const
 
INLINE Indices operator< (const Indices &other) const
 
INLINE Indices operator+ (const Indices &other) const
 
INLINE Indices operator- (const Indices &other) const
 
INLINE Indices max (const Indices &other) const
 
INLINE Indices min (const Indices &other) const
 

Static Public Member Functions

static INLINE void init ()
 Must be called once before Indices are used. More...
 

Friends

std::ostream & operator<< (std::ostream &stream, const Indices &idxs)
 

Detailed Description

Helper object for storing three (possibly four) int or bool values.

Definition at line 16 of file Indices.h.

Constructor & Destructor Documentation

◆ Indices() [1/7]

INLINE Indices::Indices ( )
default

◆ Indices() [2/7]

INLINE Indices::Indices ( __m128i  i)
inline

Definition at line 27 of file Indices.h.

◆ Indices() [3/7]

INLINE Indices::Indices ( const int  value)
inlineexplicit

Constructs indices from single value by copying it to all components.

Definition at line 32 of file Indices.h.

◆ Indices() [4/7]

INLINE Indices::Indices ( const int  i,
const int  j,
const int  k,
const int  l = 0 
)
inline

Constructs indices from values. Fourth component is optional.

Definition at line 37 of file Indices.h.

◆ Indices() [5/7]

INLINE Indices::Indices ( const BasicVector< float > &  v)
inlineexplicit

Constructs indices by casting components of vectors to ints.

Definition at line 47 of file Indices.h.

◆ Indices() [6/7]

INLINE Indices::Indices ( const BasicVector< double > &  v)
inlineexplicit
Todo:
optimize

Definition at line 51 of file Indices.h.

◆ Indices() [7/7]

INLINE Indices::Indices ( const Indices other)
inline

Definition at line 56 of file Indices.h.

Member Function Documentation

◆ init()

static INLINE void Indices::init ( )
inlinestatic

Must be called once before Indices are used.

Definition at line 60 of file Indices.h.

◆ max()

INLINE Indices Indices::max ( const Indices other) const
inline

Definition at line 120 of file Indices.h.

◆ min()

INLINE Indices Indices::min ( const Indices other) const
inline

Definition at line 124 of file Indices.h.

◆ operator BasicVector< double >()

INLINE Indices::operator BasicVector< double > ( ) const
inline
Todo:
optimize

Definition at line 81 of file Indices.h.

◆ operator BasicVector< float >()

INLINE Indices::operator BasicVector< float > ( ) const
inline

Definition at line 76 of file Indices.h.

◆ operator!=()

INLINE Indices Indices::operator!= ( const Indices other)
inline

Definition at line 100 of file Indices.h.

◆ operator+()

INLINE Indices Indices::operator+ ( const Indices other) const
inline

Definition at line 112 of file Indices.h.

◆ operator-()

INLINE Indices Indices::operator- ( const Indices other) const
inline

Definition at line 116 of file Indices.h.

◆ operator<()

INLINE Indices Indices::operator< ( const Indices other) const
inline

Definition at line 108 of file Indices.h.

◆ operator=()

INLINE Indices& Indices::operator= ( const Indices other)
inline

Definition at line 66 of file Indices.h.

◆ operator==()

INLINE Indices Indices::operator== ( const Indices other) const
inline

Definition at line 96 of file Indices.h.

◆ operator>()

INLINE Indices Indices::operator> ( const Indices other) const
inline

Definition at line 104 of file Indices.h.

◆ operator[]() [1/2]

INLINE int& Indices::operator[] ( const int  idx)
inline

Definition at line 86 of file Indices.h.

◆ operator[]() [2/2]

INLINE int Indices::operator[] ( const int  idx) const
inline

Definition at line 91 of file Indices.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const Indices idxs 
)
friend

Definition at line 128 of file Indices.h.

Member Data Documentation

◆ a

int Indices::a[4]

Definition at line 20 of file Indices.h.

◆ i

__m128i Indices::i

Definition at line 19 of file Indices.h.


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