Expression Templates Library (ETL)
Namespaces | Macros | Functions
checks.hpp File Reference

Contains utility checks. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 etl
 Root namespace for the ETL library.
 

Macros

#define validate_expression(lhs, rhs)
 

Functions

template<typename LE , typename RE >
void etl::validate_expression_impl ([[maybe_unused]] const LE &lhs, [[maybe_unused]] const RE &rhs) noexcept
 Make sure the two expressions have the same size. More...
 
template<etl_expr LE, typename RE >
void etl::validate_assign ([[maybe_unused]] const LE &lhs, [[maybe_unused]] const RE &rhs)
 
template<etl_2d E>
void etl::assert_square ([[maybe_unused]] E &&expr)
 Make sure that the expression is square. More...
 
template<size_t C1, size_t C2, dyn_2d E>
void etl::detail::validate_pmax_pooling_impl ([[maybe_unused]] const E &e)
 Make sure that the pooling ratios are correct and that the expression can be pooled from. More...
 
template<size_t C1, size_t C2, fast_2d E>
void etl::detail::validate_pmax_pooling_impl (const E &)
 
template<etl_2d E>
void etl::detail::validate_pmax_pooling_impl ([[maybe_unused]] const E &e, [[maybe_unused]] size_t c1, [[maybe_unused]] size_t c2)
 Make sure that the pooling ratios are correct and that the expression can be pooled from. More...
 
template<size_t C1, size_t C2, dimensions_between< 2, 4 > E>
void etl::validate_pmax_pooling (const E &expr)
 Make sure that the pooling ratios are correct and that the expression can be pooled from. More...
 
template<dimensions_between< 2, 4 > E>
void etl::validate_pmax_pooling (const E &expr, size_t c1, size_t c2)
 Make sure that the pooling ratios are correct and that the expression can be pooled from. More...
 

Detailed Description

Contains utility checks.

The functions are using assertions to validate their conditions. When possible, static assertions are used.

Macro Definition Documentation

◆ validate_expression

#define validate_expression (   lhs,
  rhs 
)
Value:
static_assert(all_etl_expr<decltype(lhs), decltype(rhs)>, "ETL functions are only made for ETL expressions "); \
validate_expression_impl(lhs, rhs)

Function Documentation

◆ validate_pmax_pooling_impl() [1/3]

template<size_t C1, size_t C2, dyn_2d E>
void etl::detail::validate_pmax_pooling_impl ( [[maybe_unused] ] const E &  e)

Make sure that the pooling ratios are correct and that the expression can be pooled from.

This function uses assertion to validate the condition. If possible, the assertion is done at compile time.

Template Parameters
C1The pooling ratio of the first dimension
C2The pooling ratio of the second dimension
Parameters
eThe expression to assert

◆ validate_pmax_pooling_impl() [2/3]

template<size_t C1, size_t C2, fast_2d E>
void etl::detail::validate_pmax_pooling_impl ( const E &  )

◆ validate_pmax_pooling_impl() [3/3]

template<etl_2d E>
void etl::detail::validate_pmax_pooling_impl ( [[maybe_unused] ] const E &  e,
[[maybe_unused] ] size_t  c1,
[[maybe_unused] ] size_t  c2 
)

Make sure that the pooling ratios are correct and that the expression can be pooled from.

This function uses assertion to validate the condition. If possible, the assertion is done at compile time.

Parameters
c1The pooling ratio of the first dimension
c2The pooling ratio of the second dimension
eThe expression to assert