ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Types | Private Attributes | Friends | List of all members
ROOT::Vc::Memory< V, Size1, Size2 > Class Template Reference

template<typename V, size_t Size1, size_t Size2>
class ROOT::Vc::Memory< V, Size1, Size2 >

A helper class for fixed-size two-dimensional arrays.

Parameters
VThe vector type you want to operate on. (e.g. float_v or uint_v)
Size1Number of rows
Size2Number of columns

Definition at line 120 of file memory.h.

Public Types

enum  Constants { RowCount = Size1, VectorsCount = PaddedSize2 / V::Size }
 
typedef V::EntryType EntryType
 
- Public Types inherited from ROOT::Vc::MemoryBase< V, Memory< V, Size1, Size2 >, 2, Memory< V, Size2 > >
typedef V::EntryType EntryType
 The type of the scalar entries in the array. More...
 

Public Member Functions

_VC_CONSTEXPR size_t rowsCount () const
 
_VC_CONSTEXPR size_t entriesCount () const
 
_VC_CONSTEXPR size_t vectorsCount () const
 
template<typename Parent , typename RM >
Vc_ALWAYS_INLINE Memoryoperator= (const MemoryBase< V, Parent, 2, RM > &rhs)
 Copies the data from a different object. More...
 
Vc_ALWAYS_INLINE Memoryoperator= (const Memory &rhs)
 
Memoryoperator= (const V &v)
 Initialize all data with the given vector. More...
 
- Public Member Functions inherited from ROOT::Vc::MemoryBase< V, Memory< V, Size1, Size2 >, 2, Memory< V, Size2 > >
Vc_ALWAYS_INLINE Vc_PURE size_t entriesCount () const
 
Vc_ALWAYS_INLINE Vc_PURE size_t vectorsCount () const
 
Vc_ALWAYS_INLINE Vc_PURE
VectorPointerHelper< V,
AlignedFlag
vector (size_t i)
 
Vc_ALWAYS_INLINE Vc_PURE const
VectorPointerHelperConst< V,
AlignedFlag
vector (size_t i) const
 Const overload of the above function. More...
 
Vc_ALWAYS_INLINE Vc_PURE
VectorPointerHelper< V,
UnalignedFlag
vector (size_t i, int shift)
 
Vc_ALWAYS_INLINE Vc_PURE const
VectorPointerHelperConst< V,
UnalignedFlag
vector (size_t i, int shift) const
 Const overload of the above function. More...
 
Vc_ALWAYS_INLINE Vc_PURE
VectorPointerHelper< V, A > 
vectorAt (size_t i, A)
 
Vc_ALWAYS_INLINE Vc_PURE const
VectorPointerHelperConst< V, A > 
vectorAt (size_t i, A) const
 
Vc_ALWAYS_INLINE Vc_PURE
VectorPointerHelper< V,
AlignedFlag
vectorAt (size_t i)
 
Vc_ALWAYS_INLINE Vc_PURE const
VectorPointerHelperConst< V,
AlignedFlag
vectorAt (size_t i) const
 
Vc_ALWAYS_INLINE Vc_PURE
VectorPointerHelper< V,
AlignedFlag
firstVector ()
 
Vc_ALWAYS_INLINE Vc_PURE const
VectorPointerHelperConst< V,
AlignedFlag
firstVector () const
 Const overload of the above function. More...
 
Vc_ALWAYS_INLINE Vc_PURE
VectorPointerHelper< V,
AlignedFlag
lastVector ()
 
Vc_ALWAYS_INLINE Vc_PURE const
VectorPointerHelperConst< V,
AlignedFlag
lastVector () const
 Const overload of the above function. More...
 
Vc_ALWAYS_INLINE Vc_PUREgather (const unsigned char *indexes) const
 
Vc_ALWAYS_INLINE Vc_PUREgather (const unsigned short *indexes) const
 
Vc_ALWAYS_INLINE Vc_PUREgather (const unsigned int *indexes) const
 
Vc_ALWAYS_INLINE Vc_PUREgather (const unsigned long *indexes) const
 
Vc_ALWAYS_INLINE void setZero ()
 
Memory< V, Size1, Size2 > & operator+= (const MemoryBase< V, P2, Dimension, RM > &rhs)
 
Memory< V, Size1, Size2 > & operator+= (EntryType rhs)
 
Memory< V, Size1, Size2 > & operator-= (const MemoryBase< V, P2, Dimension, RM > &rhs)
 
Memory< V, Size1, Size2 > & operator-= (EntryType rhs)
 
Memory< V, Size1, Size2 > & operator*= (const MemoryBase< V, P2, Dimension, RM > &rhs)
 
Memory< V, Size1, Size2 > & operator*= (EntryType rhs)
 
Memory< V, Size1, Size2 > & operator/= (const MemoryBase< V, P2, Dimension, RM > &rhs)
 
Memory< V, Size1, Size2 > & operator/= (EntryType rhs)
 
bool operator== (const MemoryBase< V, P2, Dimension, RM > &rhs) const
 
bool operator!= (const MemoryBase< V, P2, Dimension, RM > &rhs) const
 
bool operator< (const MemoryBase< V, P2, Dimension, RM > &rhs) const
 
bool operator<= (const MemoryBase< V, P2, Dimension, RM > &rhs) const
 
bool operator> (const MemoryBase< V, P2, Dimension, RM > &rhs) const
 
bool operator>= (const MemoryBase< V, P2, Dimension, RM > &rhs) const
 

Private Types

enum  InternalConstants { PaddedSize2 = _MemorySizeCalculation<V, Size2>::PaddedSize }
 
typedef MemoryBase< V, Memory
< V, Size1, Size2 >, 2, Memory
< V, Size2 > > 
Base
 

Private Attributes

EntryType m_mem [Size1][PaddedSize2]
 

Friends

class MemoryBase< V, Memory< V, Size1, Size2 >, 2, Memory< V, Size2 > >
 
class MemoryDimensionBase< V, Memory< V, Size1, Size2 >, 2, Memory< V, Size2 > >
 

#include <Vc/Memory>

Inheritance diagram for ROOT::Vc::Memory< V, Size1, Size2 >:
[legend]

Member Typedef Documentation

template<typename V, size_t Size1, size_t Size2>
typedef MemoryBase<V, Memory<V, Size1, Size2>, 2, Memory<V, Size2> > ROOT::Vc::Memory< V, Size1, Size2 >::Base
private

Definition at line 125 of file memory.h.

template<typename V, size_t Size1, size_t Size2>
typedef V::EntryType ROOT::Vc::Memory< V, Size1, Size2 >::EntryType

Definition at line 123 of file memory.h.

Member Enumeration Documentation

template<typename V, size_t Size1, size_t Size2>
enum ROOT::Vc::Memory::Constants
Enumerator
RowCount 
VectorsCount 

Definition at line 144 of file memory.h.

template<typename V, size_t Size1, size_t Size2>
enum ROOT::Vc::Memory::InternalConstants
private
Enumerator
PaddedSize2 

Definition at line 128 of file memory.h.

Member Function Documentation

template<typename V, size_t Size1, size_t Size2>
_VC_CONSTEXPR size_t ROOT::Vc::Memory< V, Size1, Size2 >::entriesCount ( ) const
inline
Returns
the number of scalar entries in the whole array.
Warning
Do not use this function for scalar iteration over the array since there will be padding between rows if Size2 is not divisible by V::Size.
Note
This function can be optimized into a compile-time constant.

Definition at line 163 of file memory.h.

Referenced by main(), ROOT::Vc::Memory< V, Size, 0u >::operator=(), ROOT::Vc::Memory< V, 0u, 0u >::operator=(), testCCtor(), and testCopyAssignment().

template<typename V, size_t Size1, size_t Size2>
template<typename Parent , typename RM >
Vc_ALWAYS_INLINE Memory& ROOT::Vc::Memory< V, Size1, Size2 >::operator= ( const MemoryBase< V, Parent, 2, RM > &  rhs)
inline

Copies the data from a different object.

Parameters
rhsThe object to copy the data from.
Returns
reference to the modified Memory object.
Note
Both objects must have the exact same vectorsCount().

Definition at line 181 of file memory.h.

template<typename V, size_t Size1, size_t Size2>
Vc_ALWAYS_INLINE Memory& ROOT::Vc::Memory< V, Size1, Size2 >::operator= ( const Memory< V, Size1, Size2 > &  rhs)
inline

Definition at line 187 of file memory.h.

template<typename V, size_t Size1, size_t Size2>
Memory& ROOT::Vc::Memory< V, Size1, Size2 >::operator= ( const V &  v)
inline

Initialize all data with the given vector.

Parameters
vThis vector will be used to initialize the memory.
Returns
reference to the modified Memory object.

Definition at line 199 of file memory.h.

template<typename V, size_t Size1, size_t Size2>
_VC_CONSTEXPR size_t ROOT::Vc::Memory< V, Size1, Size2 >::rowsCount ( ) const
inline
Returns
the number of rows in the array.
Note
This function can be eliminated by an optimizing compiler.

Definition at line 154 of file memory.h.

template<typename V, size_t Size1, size_t Size2>
_VC_CONSTEXPR size_t ROOT::Vc::Memory< V, Size1, Size2 >::vectorsCount ( ) const
inline
Returns
the number of vectors in the whole array.
Note
This function can be optimized into a compile-time constant.

Definition at line 169 of file memory.h.

Referenced by main(), ROOT::Vc::Memory< V, Size, 0u >::Memory(), ROOT::Vc::Memory< V, Size *Size >::operator=(), ROOT::Vc::Memory< V, Size, 0u >::operator=(), ROOT::Vc::Memory< V, 0u, 0u >::operator=(), testExponent(), and testFrexp().

Friends And Related Function Documentation

template<typename V, size_t Size1, size_t Size2>
friend class MemoryBase< V, Memory< V, Size1, Size2 >, 2, Memory< V, Size2 > >
friend

Definition at line 126 of file memory.h.

template<typename V, size_t Size1, size_t Size2>
friend class MemoryDimensionBase< V, Memory< V, Size1, Size2 >, 2, Memory< V, Size2 > >
friend

Definition at line 127 of file memory.h.

Member Data Documentation

template<typename V, size_t Size1, size_t Size2>
EntryType ROOT::Vc::Memory< V, Size1, Size2 >::m_mem[Size1][PaddedSize2]
private
Collaboration diagram for ROOT::Vc::Memory< V, Size1, Size2 >:
[legend]

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