blob: 892fe5c69e69a15cc434fe259a00838e15317911 (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// Copyright 2023-2025, Amlal El Mahrouss (amlal@nekernel.org)
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Official repository: https://github.com/ocl-org/core
#ifndef __OCL_CORE_EQUIV
#define __OCL_CORE_EQUIV
#include <ocl/detail/config.hpp>
/// @brief OCL equivalence namespace.
namespace ocl
{
template <typename T>
struct is_real final
{
using type = T;
static constexpr auto value = false;
};
template <typename L, typename R>
struct equiv_to final
{
using left_type = L;
using right_type = R;
static constexpr auto value = false;
};
template <typename L>
struct equiv_to<L, L> final
{
static constexpr auto value = true;
};
template <>
struct is_real<double> final
{
static constexpr auto value = true;
};
template <>
struct is_real<float> final
{
static constexpr auto value = true;
};
} // namespace ocl
#endif
|