blob: f9031b12b2becff62625c72c38287149e15d0d50 (
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
|
/*
* File: equiv.hpp
* Purpose: Equivalence header.
* Author: Amlal El Mahrouss (amlal@nekernel.org)
* Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License.
*/
#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
|