pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
ceil.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_VALUE_FUNCTIONS_CEIL_H
4#define pRC_CORE_VALUE_FUNCTIONS_CEIL_H
5
6#include <cmath>
7
10
11namespace pRC
12{
20 template<class T, If<IsFloat<T>> = 0>
21 static inline constexpr auto ceil(T const a)
22 {
23 return Float(std::ceil(a()));
24 }
25
36 template<class T, If<IsInteger<T>> = 0>
37 static inline constexpr auto ceil(T const a)
38 {
39 return a;
40 }
41}
42#endif // pRC_CORE_VALUE_FUNCTIONS_CEIL_H
Top-level class storing a floating point number.
Definition float.hpp:35
Definition cholesky.hpp:18
static constexpr auto ceil(X &&a)
Calculates element-wise ceiling of Tensor.
Definition ceil.hpp:21
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13