blob: 52f4535c2cfb13c5985c90b11ebb962e0470a4a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* File: math.hpp
* Purpose: Mathematics c++ header.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
* Copyright 2025, Amlal El Mahrouss, Licensed under the Boost Software License.
*/
#pragma once
namespace ocl
{
template <__SIZE_TYPE__ T>
struct is_non_boolean_integer final
{
static constexpr const bool value = true;
};
template <>
struct is_non_boolean_integer<false> final
{
static constexpr const bool value = false;
};
template <>
struct is_non_boolean_integer<true> final
{
static constexpr const bool value = false;
};
constexpr inline auto not_a_number = __builtin_nanf ("");
constexpr inline auto positive_infinity = __builtin_inff ();
constexpr inline auto negative_infinity = -positive_infinity;
} // namespace ocl
|