diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-23 20:16:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-23 20:16:02 -0500 |
| commit | 85f89ee4bb137100cbeffcbc10168eb8ea52e6cc (patch) | |
| tree | f6e2063319ceaaa02f523fb5c289e4f37411a2df /include/ocl/logic/math.hpp | |
| parent | 9a70f32ddaec0eef99efbf7ff5597c2adf08f45a (diff) | |
| parent | 65a8349aa5526d071b18cd4d42586c46faaa3823 (diff) | |
Merge pull request #18 from amlel-el-mahrouss/developv1.0.48
OCL v1.0.48
Diffstat (limited to 'include/ocl/logic/math.hpp')
| -rw-r--r-- | include/ocl/logic/math.hpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/ocl/logic/math.hpp b/include/ocl/logic/math.hpp new file mode 100644 index 0000000..d131ef9 --- /dev/null +++ b/include/ocl/logic/math.hpp @@ -0,0 +1,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
\ No newline at end of file |
