pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
prc
core
functors
max.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-2-Clause
2
3
#ifndef pRC_CORE_FUNCTORS_MAX_H
4
#define pRC_CORE_FUNCTORS_MAX_H
5
6
#include <
prc/core/basic/functions/max.hpp
>
7
#include <
prc/core/basic/type_traits.hpp
>
8
#include <
prc/core/value/limits.hpp
>
9
10
namespace
pRC
11
{
12
struct
Max
13
{
14
template
<
class
T>
15
static
constexpr
auto
Identity
()
16
{
17
return
unit<T>
(
NumericLimits<typename T::Value>::lowest
());
18
}
19
20
template
<
class
...
Xs
,
If<True<decltype(max(declval<Xs>
()...))>> = 0>
21
constexpr
decltype
(
auto
)
operator()
(
Xs
&&...
args
)
const
22
{
23
return
max
(
forward<Xs>
(
args
)...);
24
}
25
};
26
}
27
#endif
// pRC_CORE_FUNCTORS_MAX_H
max.hpp
type_traits.hpp
pRC
Definition
cholesky.hpp:18
pRC::copy
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition
copy.hpp:13
pRC::max
static constexpr X max(X &&a)
Definition
max.hpp:13
pRC::Max
Definition
max.hpp:13
pRC::Max::operator()
constexpr decltype(auto) operator()(Xs &&...args) const
Definition
max.hpp:21
pRC::Max::Identity
static constexpr auto Identity()
Definition
max.hpp:15
pRC::NumericLimits
Definition
limits.hpp:13
limits.hpp
Generated by
1.9.8