IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
ippl::Vector< T, Dim > Class Template Reference

#include <Vector.h>

Inheritance diagram for ippl::Vector< T, Dim >:
Collaboration diagram for ippl::Vector< T, Dim >:

Public Types

typedef T value_type
using iterator = T*
using const_iterator = const T*

Public Member Functions

KOKKOS_FUNCTION Vector ()
template<typename... Args, typename std::enable_if< sizeof...(Args)==Dim, bool >::type = true>
KOKKOS_FUNCTION Vector (const Args &... args)
template<typename E, size_t N>
KOKKOS_FUNCTION Vector (const detail::Expression< E, N > &expr)
KOKKOS_DEFAULTED_FUNCTION Vector (const Vector< T, Dim > &v)=default
KOKKOS_FUNCTION Vector (const T &val)
 Vector (const std::array< T, Dim > &a)
 Vector (const std::array< std::vector< T >, Dim > &a)
KOKKOS_FUNCTION Vector (const std::initializer_list< T > &list)
KOKKOS_FUNCTION ~Vector ()
KOKKOS_INLINE_FUNCTION value_typeoperator[] (unsigned int i)
KOKKOS_INLINE_FUNCTION value_type operator[] (unsigned int i) const
KOKKOS_INLINE_FUNCTION value_typeoperator() (unsigned int i)
KOKKOS_INLINE_FUNCTION value_type operator() (unsigned int i) const
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator= (const detail::Expression< E, N > &expr)
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator+= (const detail::Expression< E, N > &expr)
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator-= (const detail::Expression< E, N > &expr)
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator*= (const detail::Expression< E, N > &expr)
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator/= (const detail::Expression< E, N > &expr)
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator+= (const T &val)
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator-= (const T &val)
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator*= (const T &val)
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & operator/= (const T &val)
KOKKOS_INLINE_FUNCTION constexpr iterator begin ()
KOKKOS_INLINE_FUNCTION constexpr iterator end ()
KOKKOS_INLINE_FUNCTION constexpr const_iterator begin () const
KOKKOS_INLINE_FUNCTION constexpr const_iterator end () const
KOKKOS_INLINE_FUNCTION T dot (const Vector< T, Dim > &rhs) const
KOKKOS_INLINE_FUNCTION T Pnorm (const int p=2) const
KOKKOS_INLINE_FUNCTION auto operator[] (size_t i) const

Public Attributes

T data_m [Dim]

Static Public Attributes

static constexpr unsigned dim = Dim

Detailed Description

template<typename T, unsigned Dim>
class ippl::Vector< T, Dim >
Template Parameters
Tintrinsic vector data type
Dimvector dimension

Definition at line 23 of file Vector.h.

Member Typedef Documentation

◆ const_iterator

template<typename T, unsigned Dim>
using ippl::Vector< T, Dim >::const_iterator = const T*

Definition at line 92 of file Vector.h.

◆ iterator

template<typename T, unsigned Dim>
using ippl::Vector< T, Dim >::iterator = T*

Definition at line 91 of file Vector.h.

◆ value_type

template<typename T, unsigned Dim>
typedef T ippl::Vector< T, Dim >::value_type

Definition at line 25 of file Vector.h.

Constructor & Destructor Documentation

◆ Vector() [1/8]

template<typename T, unsigned Dim>
KOKKOS_FUNCTION ippl::Vector< T, Dim >::Vector ( )
inline

Definition at line 29 of file Vector.h.

Referenced by dot(), operator*=(), operator*=(), operator+=(), operator+=(), operator-=(), operator-=(), operator/=(), operator/=(), operator=(), and Vector().

Here is the caller graph for this function:

◆ Vector() [2/8]

template<typename T, unsigned Dim>
template<typename... Args, typename std::enable_if< sizeof...(Args)==Dim, bool >::type>
KOKKOS_FUNCTION ippl::Vector< T, Dim >::Vector ( const Args &... args)
explicit

Definition at line 18 of file Vector.hpp.

References Vector().

Here is the call graph for this function:

◆ Vector() [3/8]

template<typename T, unsigned Dim>
template<typename E, size_t N>
KOKKOS_FUNCTION ippl::Vector< T, Dim >::Vector ( const detail::Expression< E, N > & expr)

Definition at line 23 of file Vector.hpp.

References data_m, and Dim.

◆ Vector() [4/8]

template<typename T, unsigned Dim>
KOKKOS_DEFAULTED_FUNCTION ippl::Vector< T, Dim >::Vector ( const Vector< T, Dim > & v)
default

◆ Vector() [5/8]

template<typename T, unsigned Dim>
KOKKOS_FUNCTION ippl::Vector< T, Dim >::Vector ( const T & val)

Definition at line 30 of file Vector.hpp.

References data_m, and Dim.

◆ Vector() [6/8]

template<typename T, unsigned Dim>
ippl::Vector< T, Dim >::Vector ( const std::array< T, Dim > & a)

◆ Vector() [7/8]

template<typename T, unsigned Dim>
ippl::Vector< T, Dim >::Vector ( const std::array< std::vector< T >, Dim > & a)

◆ Vector() [8/8]

template<typename T, unsigned Dim>
KOKKOS_FUNCTION ippl::Vector< T, Dim >::Vector ( const std::initializer_list< T > & list)
Parameters
listof values

Definition at line 36 of file Vector.hpp.

References data_m.

◆ ~Vector()

template<typename T, unsigned Dim>
KOKKOS_FUNCTION ippl::Vector< T, Dim >::~Vector ( )
inline

Definition at line 56 of file Vector.h.

Member Function Documentation

◆ begin() [1/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION constexpr Vector< T, Dim >::iterator ippl::Vector< T, Dim >::begin ( )
constexpr

Definition at line 160 of file Vector.hpp.

References data_m.

Referenced by main(), AlpineManager< T, Dim >::scatterCIC(), ChargedParticles< PLayout, T, Dim >::scatterCIC(), and ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::updateBounds().

Here is the caller graph for this function:

◆ begin() [2/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION constexpr Vector< T, Dim >::const_iterator ippl::Vector< T, Dim >::begin ( ) const
constexpr

Definition at line 170 of file Vector.hpp.

References data_m.

◆ dot()

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION T ippl::Vector< T, Dim >::dot ( const Vector< T, Dim > & rhs) const

Definition at line 182 of file Vector.hpp.

References data_m, Dim, and Vector().

Referenced by ippl::NedelecSpace< T, Dim, Order, ElementType, QuadratureType, FieldType >::computeError(), ippl::NedelecSpace< T, Dim, Order, ElementType, QuadratureType, FieldType >::evaluateLoadVector(), ippl::NedelecSpace< T, Dim, Order, ElementType, QuadratureType, FieldType >::evaluateLoadVectorFunctor(), ippl::LagrangeSpace< T, Dim, Order, ElementType, QuadratureType, FieldLHS, FieldRHS >::DeviceStruct::getGlobalDOFIndices(), and ippl::ParticleSpatialOverlapLayout< T, Dim, Mesh, PositionProperties >::toFlatCellIndex().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ end() [1/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION constexpr Vector< T, Dim >::iterator ippl::Vector< T, Dim >::end ( )
constexpr

Definition at line 165 of file Vector.hpp.

References data_m, and Dim.

Referenced by main(), AlpineManager< T, Dim >::scatterCIC(), ChargedParticles< PLayout, T, Dim >::scatterCIC(), and ippl::random::InverseTransformSampling< T, Dim, DeviceType, Distribution >::updateBounds().

Here is the caller graph for this function:

◆ end() [2/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION constexpr Vector< T, Dim >::const_iterator ippl::Vector< T, Dim >::end ( ) const
constexpr

Definition at line 176 of file Vector.hpp.

References data_m, and Dim.

◆ operator()() [1/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim >::value_type & ippl::Vector< T, Dim >::operator() ( unsigned int i)

Definition at line 65 of file Vector.hpp.

References data_m.

◆ operator()() [2/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim >::value_type ippl::Vector< T, Dim >::operator() ( unsigned int i) const

Definition at line 72 of file Vector.hpp.

◆ operator*=() [1/2]

template<typename T, unsigned Dim>
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & ippl::Vector< T, Dim >::operator*= ( const detail::Expression< E, N > & expr)

Definition at line 115 of file Vector.hpp.

References data_m, Dim, and Vector().

Referenced by operator/=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator*=() [2/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & ippl::Vector< T, Dim >::operator*= ( const T & val)

Definition at line 147 of file Vector.hpp.

References data_m, Dim, and Vector().

Here is the call graph for this function:

◆ operator+=() [1/2]

template<typename T, unsigned Dim>
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & ippl::Vector< T, Dim >::operator+= ( const detail::Expression< E, N > & expr)

Definition at line 95 of file Vector.hpp.

References Dim, and Vector().

Referenced by operator-=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator+=() [2/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & ippl::Vector< T, Dim >::operator+= ( const T & val)

Definition at line 134 of file Vector.hpp.

References data_m, Dim, and Vector().

Here is the call graph for this function:

◆ operator-=() [1/2]

template<typename T, unsigned Dim>
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & ippl::Vector< T, Dim >::operator-= ( const detail::Expression< E, N > & expr)

Definition at line 105 of file Vector.hpp.

References data_m, Dim, and Vector().

Here is the call graph for this function:

◆ operator-=() [2/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & ippl::Vector< T, Dim >::operator-= ( const T & val)

Definition at line 142 of file Vector.hpp.

References operator+=(), and Vector().

Here is the call graph for this function:

◆ operator/=() [1/2]

template<typename T, unsigned Dim>
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & ippl::Vector< T, Dim >::operator/= ( const detail::Expression< E, N > & expr)

Definition at line 125 of file Vector.hpp.

References data_m, Dim, and Vector().

Here is the call graph for this function:

◆ operator/=() [2/2]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & ippl::Vector< T, Dim >::operator/= ( const T & val)

Definition at line 155 of file Vector.hpp.

References operator*=(), and Vector().

Here is the call graph for this function:

◆ operator=()

template<typename T, unsigned Dim>
template<typename E, size_t N>
KOKKOS_INLINE_FUNCTION Vector< T, Dim > & ippl::Vector< T, Dim >::operator= ( const detail::Expression< E, N > & expr)

Definition at line 85 of file Vector.hpp.

References data_m, Dim, and Vector().

Here is the call graph for this function:

◆ operator[]() [1/3]

KOKKOS_INLINE_FUNCTION auto ippl::detail::Expression< Vector< T, Dim >, N >::operator[] ( size_t i) const
inlineinherited

Access single element of the expression

Definition at line 32 of file IpplExpressions.h.

◆ operator[]() [2/3]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim >::value_type & ippl::Vector< T, Dim >::operator[] ( unsigned int i)

Definition at line 51 of file Vector.hpp.

References data_m.

◆ operator[]() [3/3]

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION Vector< T, Dim >::value_type ippl::Vector< T, Dim >::operator[] ( unsigned int i) const

Definition at line 58 of file Vector.hpp.

◆ Pnorm()

template<typename T, unsigned Dim>
KOKKOS_INLINE_FUNCTION T ippl::Vector< T, Dim >::Pnorm ( const int p = 2) const

Definition at line 191 of file Vector.hpp.

References data_m, and Dim.

Member Data Documentation

◆ data_m

template<typename T, unsigned Dim>
T ippl::Vector< T, Dim >::data_m[Dim]

◆ dim


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