Template Numerical Library version\ main:481315e2
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
TNL::Containers Namespace Reference

Namespace for TNL containers. More...

Classes

class  Array
 Array is responsible for memory management, access to array elements, and general array operations. More...
 
class  ArrayView
 ArrayView is a simple data structure which provides a non-owning encapsulation of array data. That is, ArrayView is like Array without memory management. More...
 
class  ByteArraySynchronizer
 
class  DistributedArray
 Distributed array. More...
 
class  DistributedArrayView
 Distributed array view. More...
 
class  DistributedNDArray
 Distributed N-dimensional array. More...
 
class  DistributedNDArraySynchronizer
 Synchronizer for DistributedNDArray. More...
 
class  DistributedNDArrayView
 Distributed N-dimensional array view. More...
 
class  DistributedVector
 DistributedVector extends DistributedArray with algebraic operations. More...
 
class  DistributedVectorView
 DistributedVectorView extends DistributedArrayView with algebraic operations. More...
 
class  GinkgoVector
 Wrapper for representing vectors using Ginkgo data structure. More...
 
class  HypreParVector
 Wrapper for Hypre's parallel vector. More...
 
class  HypreVector
 Wrapper for Hypre's sequential vector. More...
 
class  IndexedMap
 
class  IndexedSet
 
class  NDArray
 Dynamic N-dimensional array. More...
 
class  NDArrayIndexer
 Indexer for N-dimensional arrays. It does not store any data, only the sizes of each dimension. More...
 
class  NDArrayStorage
 Base storage class for NDArray, StaticNDArray and SlicedNDArray. More...
 
class  NDArrayView
 Simple data structure which provides a non-owning encapsulation of N-dimensional array data. More...
 
class  Partitioner
 
class  SizesHolder
 Holds static and dynamic sizes of an N-dimensional array. More...
 
class  SlicedNDArray
 Dynamic N-dimensional array with configurable slicing/tiling. More...
 
struct  SliceInfo
 Describes slicing configuration for SlicedNDArray. More...
 
class  StaticArray
 Array with constant size. More...
 
class  StaticNDArray
 Static N-dimensional array. More...
 
class  StaticVector
 Vector with constant size. More...
 
class  Subrange
 
class  UnorderedIndexedSet
 
class  Vector
 Vector extends Array with algebraic operations. More...
 
class  VectorView
 VectorView extends ArrayView with algebraic operations. More...
 

Enumerations

enum class  SyncDirection : std::uint8_t { SyncDirection::All = 0xff , SyncDirection::None = 0 , SyncDirection::Right = 1 << 0 , SyncDirection::Left = 1 << 1 }
 Directions for data synchronization in a distributed N-dimensional array. More...
 

Functions

template<std::size_t I, int N, class T >
constexpr const T && get (const StaticArray< N, T > &&a) noexcept
 
template<std::size_t I, int N, class T >
constexpr const T & get (const StaticArray< N, T > &a) noexcept
 
template<std::size_t I, int N, class T >
constexpr const T && get (const StaticVector< N, T > &&a) noexcept
 
template<std::size_t I, int N, class T >
constexpr const T & get (const StaticVector< N, T > &a) noexcept
 
template<std::size_t I, int N, class T >
constexpr T && get (StaticArray< N, T > &&a) noexcept
 
template<std::size_t I, int N, class T >
constexpr T & get (StaticArray< N, T > &a) noexcept
 
template<std::size_t I, int N, class T >
constexpr T && get (StaticVector< N, T > &&a) noexcept
 
template<std::size_t I, int N, class T >
constexpr T & get (StaticVector< N, T > &a) noexcept
 
template<typename Output , typename Input >
void nd_absolute (Output &output, const Input &input)
 
template<typename Output , typename Input1 , typename Input2 >
void nd_add (Output &output, const Input1 &input1, const Input2 &input2)
 
template<typename Output , typename Input >
void nd_assign (Output &output, const Input &input)
 
template<typename Output , typename Input1 , typename Input2 >
void nd_divide (Output &output, const Input1 &input1, const Input2 &input2)
 
template<typename Output , typename Func , typename... Input>
void nd_map (Output &output, Func f, const Input &... input)
 
template<typename Output , typename Input1 , typename Input2 >
void nd_maximum (Output &output, const Input1 &input1, const Input2 &input2)
 
template<typename Output , typename Input1 , typename Input2 >
void nd_minimum (Output &output, const Input1 &input1, const Input2 &input2)
 
template<typename Output , typename Input1 , typename Input2 >
void nd_multiply (Output &output, const Input1 &input1, const Input2 &input2)
 
template<typename Output , typename Input1 , typename Input2 >
void nd_pow (Output &output, const Input1 &input1, const Input2 &input2)
 
template<typename Output , typename Input >
void nd_sign (Output &output, const Input &input)
 
template<typename Output , typename Input >
void nd_sqrt (Output &output, const Input &input)
 
template<typename Output , typename Input >
void nd_square (Output &output, const Input &input)
 
template<typename Output , typename Input1 , typename Input2 >
void nd_subtract (Output &output, const Input1 &input1, const Input2 &input2)
 
SyncDirection operator& (SyncDirection a, SyncDirection b)
 Bitwise AND operator for SyncDirection.
 
template<typename Index , std::size_t... sizes, typename OtherHolder >
SizesHolder< Index, sizes... > operator+ (const SizesHolder< Index, sizes... > &lhs, const OtherHolder &rhs)
 Combines the sizes of two instance of SizesHolder with the operator +.
 
template<typename Index , std::size_t... sizes, typename OtherHolder >
SizesHolder< Index, sizes... > operator- (const SizesHolder< Index, sizes... > &lhs, const OtherHolder &rhs)
 Combines the sizes of two instance of SizesHolder with the operator -.
 
SyncDirectionoperator-= (SyncDirection &a, SyncDirection b)
 Bitwise operator which clears all bits from b in a.
 
template<typename Value , typename Device , typename Index >
Fileoperator<< (File &&file, ArrayView< Value, Device, Index > view)
 
template<typename Value , typename Device , typename Index , typename Allocator >
Fileoperator<< (File &&file, const Array< Value, Device, Index, Allocator > &array)
 
template<int Size, typename Value >
Fileoperator<< (File &&file, const StaticArray< Size, Value > &array)
 Serialization of static arrays into binary files.
 
template<typename Value , typename Device , typename Index >
Fileoperator<< (File &file, ArrayView< Value, Device, Index > view)
 Serialization of array views into binary files.
 
template<typename Value , typename Device , typename Index , typename Allocator >
Fileoperator<< (File &file, const Array< Value, Device, Index, Allocator > &array)
 Serialization of arrays into binary files.
 
template<int Size, typename Value >
Fileoperator<< (File &file, const StaticArray< Size, Value > &array)
 Serialization of static arrays into binary files.
 
template<typename Value , typename Device , typename Index , typename Allocator >
std::ostreamoperator<< (std::ostream &str, const Array< Value, Device, Index, Allocator > &array)
 Overloaded insertion operator for printing an array to output stream.
 
template<typename Value , typename Device , typename Index >
std::ostreamoperator<< (std::ostream &str, const ArrayView< Value, Device, Index > &view)
 Overloaded insertion operator for printing an array view to output stream.
 
template<typename Index , std::size_t... sizes>
std::ostreamoperator<< (std::ostream &str, const SizesHolder< Index, sizes... > &holder)
 Prints the sizes contained in an instance of SizesHolder to the given output stream.
 
template<int Size, typename Value >
std::ostreamoperator<< (std::ostream &str, const StaticArray< Size, Value > &a)
 
template<typename Index >
std::ostreamoperator<< (std::ostream &str, const Subrange< Index > &range)
 
template<typename Value , typename Index , typename Key >
std::ostreamoperator<< (std::ostream &str, IndexedMap< Value, Index, Key > &set)
 
template<typename Element , typename Index >
std::ostreamoperator<< (std::ostream &str, IndexedSet< Element, Index > &set)
 
template<class Key , class Index , class Compare , class Allocator >
std::ostreamoperator<< (std::ostream &str, IndexedSet< Key, Index, Compare, Allocator > &set)
 
template<typename Element , typename Index >
std::ostreamoperator<< (std::ostream &str, UnorderedIndexedSet< Element, Index > &set)
 
template<class Key , class Index , class Hash , class KeyEqual , class Allocator >
std::ostreamoperator<< (std::ostream &str, UnorderedIndexedSet< Key, Index, Hash, KeyEqual, Allocator > &set)
 
template<typename Value , typename Device , typename Index , typename Allocator >
Fileoperator>> (File &&file, Array< Value, Device, Index, Allocator > &array)
 
template<typename Value , typename Device , typename Index >
Fileoperator>> (File &&file, ArrayView< Value, Device, Index > view)
 
template<int Size, typename Value >
Fileoperator>> (File &&file, StaticArray< Size, Value > &array)
 Deserialization of static arrays from binary files.
 
template<typename Value , typename Device , typename Index , typename Allocator >
Fileoperator>> (File &file, Array< Value, Device, Index, Allocator > &array)
 Deserialization of arrays from binary files.
 
template<typename Value , typename Device , typename Index >
Fileoperator>> (File &file, ArrayView< Value, Device, Index > view)
 Deserialization of array views from binary files.
 
template<int Size, typename Value >
Fileoperator>> (File &file, StaticArray< Size, Value > &array)
 Deserialization of static arrays from binary files.
 
SyncDirection operator| (SyncDirection a, SyncDirection b)
 Bitwise OR operator for SyncDirection.
 
template<typename Real >
__cuda_callable__ Real TriangleArea (const StaticVector< 2, Real > &a, const StaticVector< 2, Real > &b, const StaticVector< 2, Real > &c)
 
template<typename Real >
__cuda_callable__ Real TriangleArea (const StaticVector< 3, Real > &a, const StaticVector< 3, Real > &b, const StaticVector< 3, Real > &c)
 
template<typename Real >
__cuda_callable__ StaticVector< 3, RealVectorProduct (const StaticVector< 3, Real > &u, const StaticVector< 3, Real > &v)
 

Detailed Description

Namespace for TNL containers.

Function Documentation

◆ operator<<() [1/4]

template<int Size, typename Value >
File & TNL::Containers::operator<< ( File &&  file,
const StaticArray< Size, Value > &  array 
)

Serialization of static arrays into binary files.

Parameters
fileoutput file
arrayis an array to be written into the output file.

◆ operator<<() [2/4]

template<int Size, typename Value >
File & TNL::Containers::operator<< ( File file,
const StaticArray< Size, Value > &  array 
)

Serialization of static arrays into binary files.

Parameters
fileoutput file
arrayis an array to be written into the output file.

◆ operator<<() [3/4]

template<typename Value , typename Device , typename Index , typename Allocator >
std::ostream & TNL::Containers::operator<< ( std::ostream str,
const Array< Value, Device, Index, Allocator > &  array 
)

Overloaded insertion operator for printing an array to output stream.

Template Parameters
Valueis a type of the array elements.
Deviceis a device where the array is allocated.
Indexis a type used for the indexing of the array elements.
Parameters
stris a output stream.
arrayis the array to be printed.
Returns
a reference to the output stream std::ostream.

◆ operator<<() [4/4]

template<typename Value , typename Device , typename Index >
std::ostream & TNL::Containers::operator<< ( std::ostream str,
const ArrayView< Value, Device, Index > &  view 
)

Overloaded insertion operator for printing an array view to output stream.

Template Parameters
Valueis a type of the array view elements.
Deviceis a device where the array view is allocated.
Indexis a type used for the indexing of the array view elements.
Parameters
stris a output stream.
viewis the array view to be printed.
Returns
a reference to the output stream std::ostream.

◆ operator>>() [1/2]

template<int Size, typename Value >
File & TNL::Containers::operator>> ( File &&  file,
StaticArray< Size, Value > &  array 
)

Deserialization of static arrays from binary files.

Parameters
fileinput file
arrayis an array to be read from the input file.

◆ operator>>() [2/2]

template<int Size, typename Value >
File & TNL::Containers::operator>> ( File file,
StaticArray< Size, Value > &  array 
)

Deserialization of static arrays from binary files.

Parameters
fileinput file
arrayis an array to be read from the input file.