|
Himalaya
|
Contains the definition of the SUM macro. More...
#include <type_traits>#include <cstddef>#include <Eigen/Core>

Go to the source code of this file.
Namespaces | |
| himalaya | |
| himalaya::mh2_fo | |
Macros | |
| #define | SUM(...) (get_sum(__VA_ARGS__)(__VA_ARGS__)) |
| #define | get_sum(...) get_sum_macro(__VA_ARGS__, sum_user_t, sum_ptrdiff_t,) |
| #define | get_sum_macro(_1, _2, _3, _4, _5, name, ...) name |
| #define | sum_ptrdiff_t(idx, ini, fin, expr) sum<std::ptrdiff_t>((ini), (fin), [&](std::ptrdiff_t (idx)) { return (expr); }) |
| #define | sum_user_t(type, idx, ini, fin, expr) sum<type>((ini), (fin), [&](type (idx)) { return (expr); }) |
Functions | |
| template<typename Idx , typename Function > | |
| auto | himalaya::mh2_fo::EvalEigenXpr (Idx i, Function f) -> decltype(EvalEigenXprImpl< Idx, Function, is_eigen_type< decltype(f(i))>::value >::eval(i, f)) |
| template<class Idx , class Function > | |
| auto | himalaya::mh2_fo::sum (Idx ini, Idx fin, Function f) -> decltype(EvalEigenXpr< Idx >(ini, f)) |
Contains the definition of the SUM macro.
Usage example of the SUM macro:
Calculate 
Definition in file Sum.hpp.
| #define get_sum | ( | ... | ) | get_sum_macro(__VA_ARGS__, sum_user_t, sum_ptrdiff_t,) |
| #define sum_ptrdiff_t | ( | idx, | |
| ini, | |||
| fin, | |||
| expr | |||
| ) | sum<std::ptrdiff_t>((ini), (fin), [&](std::ptrdiff_t (idx)) { return (expr); }) |
1.8.13