| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Functions
Gaudi::Functional::details::zip Namespace Reference

## Functions
template<typename A >
bool | check_sizes (const A &) noexcept
| Resolve case there is only one container in the range. More...
template<typename A , typename B >
bool | check_sizes (const A &a, const B &b) noexcept
| Compare sizes of two containers. More...
template<typename A , typename B , typename... C>
bool | check_sizes (const A &a, const B &b, const C &...c) noexcept
| Compare sizes of 3 or more containers. More...
template<typename... Args>
decltype(auto) | verifySizes (Args &...args)
| Verify the data container sizes have the same sizes. More...
template<typename... Args>
decltype(auto) | range (Args &&...args)
| Zips multiple containers together to form a single range. More...
template<typename... Args>
decltype(auto) | const_range (Args &&...args)
| Zips multiple containers together to form a single const range. More...

## Function Documentation

template<typename A >

bool Gaudi::Functional::details::zip::check_sizes | ( | const A & |  | ) |
| inline noexcept

Resolve case there is only one container in the range.

Definition at line 29 of file FunctionalDetails.h.

29 { return true; }
template<typename A , typename B >

bool Gaudi::Functional::details::zip::check_sizes | ( | const A & | a,
|  | const B & | b
| ) |  |
| inline noexcept

Compare sizes of two containers.

Definition at line 33 of file FunctionalDetails.h.

34 {
35 return a.size() == b.size();
36 }
template<typename A , typename B , typename... C>

bool Gaudi::Functional::details::zip::check_sizes | ( | const A & | a,
|  | const B & | b,
|  | const C &... | c
| ) |  |
| inline noexcept

Compare sizes of 3 or more containers.

Definition at line 40 of file FunctionalDetails.h.

41 {
42 return ( check_sizes(a,b) && check_sizes(b,c...) );
43 }
gaudirun.c
c
Definition: gaudirun.py:391
Gaudi::Functional::details::zip::check_sizes
bool check_sizes(const A &a, const B &b, const C &...c) noexcept
Compare sizes of 3 or more containers.
Definition: FunctionalDetails.h:40
template<typename... Args>

decltype(auto) Gaudi::Functional::details::zip::const_range | ( | Args &&... | args | ) |
| inline

Zips multiple containers together to form a single const range.

Definition at line 66 of file FunctionalDetails.h.

67 {
68 //assert( check_sizes( args... ) );
69 verifySizes( args... );
70 return ranges::view::const_( ranges::view::zip( std::forward<Args>(args)... ) );
71 }
gaudirun.args
args
Definition: gaudirun.py:236
Gaudi::Functional::details::zip::verifySizes
decltype(auto) verifySizes(Args &...args)
Verify the data container sizes have the same sizes.
Definition: FunctionalDetails.h:47
template<typename... Args>

decltype(auto) Gaudi::Functional::details::zip::range | ( | Args &&... | args | ) |
| inline

Zips multiple containers together to form a single range.

Definition at line 57 of file FunctionalDetails.h.

58 {
59 //assert( check_sizes( args... ) );
60 verifySizes( args... );
61 return ranges::view::zip( std::forward<Args>(args)... );
62 }
gaudirun.args
args
Definition: gaudirun.py:236
Gaudi::Functional::details::zip::verifySizes
decltype(auto) verifySizes(Args &...args)
Verify the data container sizes have the same sizes.
Definition: FunctionalDetails.h:47
template<typename... Args>

decltype(auto) Gaudi::Functional::details::zip::verifySizes | ( | Args &... | args | ) |
| inline

Verify the data container sizes have the same sizes.

Definition at line 47 of file FunctionalDetails.h.

48 {
49 if ( UNLIKELY( !check_sizes( args... ) ) )
50 { throw GaudiException( "Zipped containers have different sizes.",
51 "Gaudi::Functional::details::zip::verifySizes",
52 StatusCode::FAILURE ); }
53 }
GaudiException
Define general base for Gaudi exception.
Definition: GaudiException.h:23
StatusCode::FAILURE
Definition: StatusCode.h:29
gaudirun.args
args
Definition: gaudirun.py:236
UNLIKELY
#define UNLIKELY(x)
Definition: Kernel.h:126
Gaudi::Functional::details::zip::check_sizes
bool check_sizes(const A &a, const B &b, const C &...c) noexcept
Compare sizes of 3 or more containers.
Definition: FunctionalDetails.h:40