4#ifndef TETL_CMATH_CEIL_HPP
5#define TETL_CMATH_CEIL_HPP
7#include <etl/_3rd_party/gcem/gcem.hpp>
8#include <etl/_concepts/integral.hpp>
9#include <etl/_type_traits/is_constant_evaluated.hpp>
15inline constexpr struct ceil {
16 template <
typename Float>
17 [[nodiscard]]
constexpr auto operator()(Float arg)
const noexcept -> Float
20#if __has_builtin(__builtin_ceilf)
21 if constexpr (etl::same_as<Float,
float>) {
22 return __builtin_ceilf(arg);
25#if __has_builtin(__builtin_ceil)
26 if constexpr (etl::same_as<Float,
double>) {
27 return __builtin_ceil(arg);
31 return etl::detail::gcem::ceil(arg);
44 return etl::detail::ceil(arg);
48 return etl::detail::ceil(arg);
52 return etl::detail::ceil(arg);
54[[
nodiscard]]
constexpr auto ceil(
long double arg)
noexcept ->
long double
56 return etl::detail::ceil(arg);
60 return etl::detail::ceil(arg);
constexpr auto ceilf(float arg) noexcept -> float
Definition ceil.hpp:46
constexpr auto ceil(long double arg) noexcept -> long double
Definition ceil.hpp:54
constexpr auto ceil(float arg) noexcept -> float
Definition ceil.hpp:42
constexpr auto ceill(long double arg) noexcept -> long double
Definition ceil.hpp:58
constexpr auto ceil(double arg) noexcept -> double
Definition ceil.hpp:50
Definition adjacent_find.hpp:9
constexpr auto is_constant_evaluated() noexcept -> bool
Detects whether the function call occurs within a constant-evaluated context. Returns true if the eva...
Definition is_constant_evaluated.hpp:17