Skip to content

Commit 9a44ce8

Browse files
committed
Refactored concepts
1 parent 6a2bcff commit 9a44ce8

File tree

5 files changed

+87
-117
lines changed

5 files changed

+87
-117
lines changed

include/nbl/builtin/hlsl/concepts/core.hlsl

Lines changed: 23 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -16,81 +16,51 @@ namespace hlsl
1616
namespace concepts
1717
{
1818

19-
#ifdef __cpp_concepts // CPP
20-
21-
#include <concepts>
22-
23-
// Alias some of the std concepts in nbl. As this is C++20 only, we don't need to use
24-
// the macros here.
25-
template <typename T, typename U>
26-
concept same_as = std::same_as<T, U>;
27-
28-
template <typename D, typename B>
29-
concept derived_from = std::derived_from<D, B>;
30-
31-
template <typename F, typename T>
32-
concept convertible_to = std::convertible_to<F, T>;
33-
34-
template <typename T, typename F>
35-
concept assignable_from = std::assignable_from<T, F>;
19+
template<typename T, typename U>
20+
NBL_BOOL_CONCEPT same_as = is_same_v<T, U>;
3621

37-
template <typename T, typename U>
38-
concept common_with = std::common_with<T, U>;
22+
template<typename T>
23+
NBL_BOOL_CONCEPT Integral = nbl::hlsl::is_integral_v<T>;
3924

40-
template <typename T>
41-
concept integral = std::integral<T>;
25+
template<typename T>
26+
NBL_BOOL_CONCEPT SignedIntegral = nbl::hlsl::is_signed_v<T> && nbl::hlsl::is_integral_v<T>;
4227

43-
template <typename T>
44-
concept signed_integral = std::signed_integral<T>;
28+
template<typename T>
29+
NBL_BOOL_CONCEPT UnsignedIntegral = !nbl::hlsl::is_signed_v<T> && ::nbl::hlsl::is_integral_v<T>;
4530

46-
template <typename T>
47-
concept unsigned_integral = std::unsigned_integral<T>;
31+
template<typename T>
32+
NBL_BOOL_CONCEPT FloatingPoint = nbl::hlsl::is_floating_point_v<T>;
4833

4934
template <typename T>
50-
concept floating_point = std::floating_point<T>;
35+
NBL_BOOL_CONCEPT scalar = FloatingPoint<T> || Integral<T>;
5136

52-
// Some other useful concepts.
53-
54-
template<typename T, typename... Ts>
55-
concept any_of = (same_as<T, Ts> || ...);
37+
template<typename T>
38+
NBL_BOOL_CONCEPT IntegralScalar = nbl::hlsl::is_integral_v<T> && nbl::hlsl::is_scalar_v<T>;
5639

57-
template <typename T>
58-
concept scalar = floating_point<T> || integral<T>;
40+
template<typename T>
41+
NBL_BOOL_CONCEPT SignedIntegralScalar = nbl::hlsl::is_signed_v<T> && nbl::hlsl::is_integral_v<T> && nbl::hlsl::is_scalar_v<T>;
5942

60-
#elif defined(__HLSL_VERSION) // HLSL
43+
template<typename T>
44+
NBL_BOOL_CONCEPT UnsignedIntegralScalar = !nbl::hlsl::is_signed_v<T> && ::nbl::hlsl::is_integral_v<T> && nbl::hlsl::is_scalar_v<T>;
6145

62-
template<typename T, typename U>
63-
NBL_BOOL_CONCEPT same_as = is_same_v<T, U>;
46+
template<typename T>
47+
NBL_BOOL_CONCEPT FloatingPointScalar = nbl::hlsl::is_floating_point_v<T> && nbl::hlsl::is_scalar_v<T>;
6448

6549
// TODO: implement when hlsl::is_base_of is done
66-
//#define NBL_CONCEPT_NAME derived_from
50+
//#define NBL_CONCEPT_NAME DerivedFrom
6751
// ...
6852

6953
// TODO: implement when hlsl::is_converible is done
70-
//#define NBL_CONCEPT_NAME convertible_to
54+
//#define NBL_CONCEPT_NAME ConvertibleTo
7155
// ...
7256

7357
// TODO?
74-
//#define NBL_CONCEPT_NAME assignable_from
58+
//#define NBL_CONCEPT_NAME AssignableFrom
7559

7660
// TODO?
7761
//template <typename T, typename U>
7862
//concept common_with = std::common_with<T, U>;
7963

80-
template<typename T>
81-
NBL_BOOL_CONCEPT integral = nbl::hlsl::is_integral_v<T> && nbl::hlsl::is_scalar_v<T>;
82-
83-
template<typename T>
84-
NBL_BOOL_CONCEPT signed_integral = nbl::hlsl::is_signed_v<T> && nbl::hlsl::is_integral_v<T> && nbl::hlsl::is_scalar_v<T>;
85-
86-
template<typename T>
87-
NBL_BOOL_CONCEPT unsigned_integral = !nbl::hlsl::is_signed_v<T> && ::nbl::hlsl::is_integral_v<T> && nbl::hlsl::is_scalar_v<T>;
88-
89-
template<typename T>
90-
NBL_BOOL_CONCEPT floating_point = nbl::hlsl::is_floating_point_v<T> && nbl::hlsl::is_scalar_v<T>;
91-
92-
#endif
93-
9464
namespace impl
9565
{
9666
template<typename T>
@@ -102,7 +72,7 @@ struct IsEmulatingFloatingPointType
10272

10373
//! Floating point types are native floating point types or types that imitate native floating point types (for example emulated_float64_t)
10474
template<typename T>
105-
NBL_BOOL_CONCEPT FloatingPointLike = (nbl::hlsl::is_floating_point_v<T> && nbl::hlsl::is_scalar_v<T>) || impl::IsEmulatingFloatingPointType<T>::value;
75+
NBL_BOOL_CONCEPT FloatingPointLikeScalar = (nbl::hlsl::is_floating_point_v<T> && nbl::hlsl::is_scalar_v<T>) || impl::IsEmulatingFloatingPointType<T>::value;
10676

10777
}
10878
}

include/nbl/builtin/hlsl/concepts/vector.hlsl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ namespace concepts
2121
template<typename T>
2222
NBL_BOOL_CONCEPT Vector = is_vector<T>::value;
2323
template<typename T>
24-
NBL_BOOL_CONCEPT FloatingPointVector = concepts::Vector<T> && concepts::floating_point<typename vector_traits<T>::scalar_type>;
24+
NBL_BOOL_CONCEPT FloatingPointVector = concepts::Vector<T> && concepts::FloatingPointScalar<typename vector_traits<T>::scalar_type>;
2525
template<typename T>
2626
NBL_BOOL_CONCEPT IntVector = concepts::Vector<T> && (is_integral_v<typename vector_traits<T>::scalar_type>);
2727
template<typename T>
28-
NBL_BOOL_CONCEPT SignedIntVector = concepts::Vector<T> && concepts::signed_integral<typename vector_traits<T>::scalar_type>;
28+
NBL_BOOL_CONCEPT SignedIntVector = concepts::Vector<T> && concepts::SignedIntegralScalar<typename vector_traits<T>::scalar_type>;
2929

3030
//! Concept for native vectors and vector like structs.
3131
//! The only requirement for a structure to be Vectorial is that a correct template specialization of the `vector_traits` structure should be created for it.
@@ -48,13 +48,13 @@ NBL_BOOL_CONCEPT Vectorial = vector_traits<T>::IsVector;
4848
#include <nbl/builtin/hlsl/concepts/__end.hlsl>
4949

5050
template<typename T>
51-
NBL_BOOL_CONCEPT FloatingPointVectorial = concepts::Vectorial<T> && concepts::floating_point<typename vector_traits<T>::scalar_type>;
51+
NBL_BOOL_CONCEPT FloatingPointVectorial = concepts::Vectorial<T> && concepts::FloatingPointScalar<typename vector_traits<T>::scalar_type>;
5252
template<typename T>
53-
NBL_BOOL_CONCEPT FloatingPointLikeVectorial = concepts::Vectorial<T> && concepts::FloatingPointLike<typename vector_traits<T>::scalar_type>;
53+
NBL_BOOL_CONCEPT FloatingPointLikeVectorial = concepts::Vectorial<T> && concepts::FloatingPointLikeScalar<typename vector_traits<T>::scalar_type>;
5454
template<typename T>
5555
NBL_BOOL_CONCEPT IntVectorial = concepts::Vectorial<T> && (is_integral_v<typename vector_traits<T>::scalar_type>);
5656
template<typename T>
57-
NBL_BOOL_CONCEPT SignedIntVectorial = concepts::Vectorial<T> && concepts::signed_integral<typename vector_traits<T>::scalar_type>;
57+
NBL_BOOL_CONCEPT SignedIntVectorial = concepts::Vectorial<T> && concepts::SignedIntegralScalar<typename vector_traits<T>::scalar_type>;
5858

5959
}
6060
}

include/nbl/builtin/hlsl/cpp_compat/impl/intrinsics_impl.hlsl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
9696
struct clamp_helper;
9797

9898
template<typename FloatingPoint>
99-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
100-
struct clamp_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
99+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
100+
struct clamp_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
101101
{
102102
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) val, NBL_CONST_REF_ARG(FloatingPoint) min, NBL_CONST_REF_ARG(FloatingPoint) max)
103103
{
@@ -110,8 +110,8 @@ struct clamp_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<F
110110
};
111111

112112
template<typename UnsignedInteger>
113-
NBL_PARTIAL_REQ_TOP(concepts::unsigned_integral<UnsignedInteger>)
114-
struct clamp_helper<UnsignedInteger NBL_PARTIAL_REQ_BOT(concepts::unsigned_integral<UnsignedInteger>) >
113+
NBL_PARTIAL_REQ_TOP(concepts::UnsignedIntegralScalar<UnsignedInteger>)
114+
struct clamp_helper<UnsignedInteger NBL_PARTIAL_REQ_BOT(concepts::UnsignedIntegralScalar<UnsignedInteger>) >
115115
{
116116
static UnsignedInteger __call(NBL_CONST_REF_ARG(UnsignedInteger) val, NBL_CONST_REF_ARG(UnsignedInteger) min, NBL_CONST_REF_ARG(UnsignedInteger) max)
117117
{
@@ -124,8 +124,8 @@ struct clamp_helper<UnsignedInteger NBL_PARTIAL_REQ_BOT(concepts::unsigned_integ
124124
};
125125

126126
template<typename Integer>
127-
NBL_PARTIAL_REQ_TOP(concepts::signed_integral<Integer>)
128-
struct clamp_helper<Integer NBL_PARTIAL_REQ_BOT(concepts::signed_integral<Integer>) >
127+
NBL_PARTIAL_REQ_TOP(concepts::SignedIntegralScalar<Integer>)
128+
struct clamp_helper<Integer NBL_PARTIAL_REQ_BOT(concepts::SignedIntegralScalar<Integer>) >
129129
{
130130
static Integer __call(NBL_CONST_REF_ARG(Integer) val, NBL_CONST_REF_ARG(Integer) min, NBL_CONST_REF_ARG(Integer) max)
131131
{
@@ -404,8 +404,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
404404
struct bitReverse_helper;
405405

406406
template<typename Integer>
407-
NBL_PARTIAL_REQ_TOP(concepts::signed_integral<Integer>)
408-
struct bitReverse_helper<Integer NBL_PARTIAL_REQ_BOT(concepts::signed_integral<Integer>) >
407+
NBL_PARTIAL_REQ_TOP(concepts::SignedIntegralScalar<Integer>)
408+
struct bitReverse_helper<Integer NBL_PARTIAL_REQ_BOT(concepts::SignedIntegralScalar<Integer>) >
409409
{
410410
static inline Integer __call(NBL_CONST_REF_ARG(Integer) val)
411411
{
@@ -595,8 +595,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
595595
struct min_helper;
596596

597597
template<typename FloatingPoint>
598-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
599-
struct min_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
598+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
599+
struct min_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
600600
{
601601
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) a, NBL_CONST_REF_ARG(FloatingPoint) b)
602602
{
@@ -609,8 +609,8 @@ struct min_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<Flo
609609
};
610610

611611
template<typename UnsignedInteger>
612-
NBL_PARTIAL_REQ_TOP(concepts::unsigned_integral<UnsignedInteger>)
613-
struct min_helper<UnsignedInteger NBL_PARTIAL_REQ_BOT(concepts::unsigned_integral<UnsignedInteger>) >
612+
NBL_PARTIAL_REQ_TOP(concepts::UnsignedIntegralScalar<UnsignedInteger>)
613+
struct min_helper<UnsignedInteger NBL_PARTIAL_REQ_BOT(concepts::UnsignedIntegralScalar<UnsignedInteger>) >
614614
{
615615
static UnsignedInteger __call(NBL_CONST_REF_ARG(UnsignedInteger) a, NBL_CONST_REF_ARG(UnsignedInteger) b)
616616
{
@@ -623,8 +623,8 @@ struct min_helper<UnsignedInteger NBL_PARTIAL_REQ_BOT(concepts::unsigned_integra
623623
};
624624

625625
template<typename Integer>
626-
NBL_PARTIAL_REQ_TOP(concepts::signed_integral<Integer>)
627-
struct min_helper<Integer NBL_PARTIAL_REQ_BOT(concepts::signed_integral<Integer>) >
626+
NBL_PARTIAL_REQ_TOP(concepts::SignedIntegralScalar<Integer>)
627+
struct min_helper<Integer NBL_PARTIAL_REQ_BOT(concepts::SignedIntegralScalar<Integer>) >
628628
{
629629
static Integer __call(NBL_CONST_REF_ARG(Integer) a, NBL_CONST_REF_ARG(Integer) b)
630630
{
@@ -660,8 +660,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
660660
struct max_helper;
661661

662662
template<typename FloatingPoint>
663-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
664-
struct max_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
663+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
664+
struct max_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
665665
{
666666
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) a, NBL_CONST_REF_ARG(FloatingPoint) b)
667667
{
@@ -763,8 +763,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
763763
struct rsqrt_helper;
764764

765765
template<typename FloatingPoint>
766-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
767-
struct rsqrt_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
766+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
767+
struct rsqrt_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
768768
{
769769
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x)
770770
{

include/nbl/builtin/hlsl/impl/tgmath_impl.hlsl

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
9999
struct isnan_helper;
100100

101101
template<typename FloatingPoint>
102-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
103-
struct isnan_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
102+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
103+
struct isnan_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
104104
{
105105
static bool __call(NBL_CONST_REF_ARG(FloatingPoint) x)
106106
{
@@ -148,8 +148,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
148148
struct isinf_helper;
149149

150150
template<typename FloatingPoint>
151-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
152-
struct isinf_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
151+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
152+
struct isinf_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
153153
{
154154
static bool __call(NBL_CONST_REF_ARG(FloatingPoint) x)
155155
{
@@ -227,8 +227,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
227227
struct erf_helper;
228228

229229
template<typename FloatingPoint>
230-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
231-
struct erf_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
230+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
231+
struct erf_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
232232
{
233233
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) _x)
234234
{
@@ -259,8 +259,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
259259
struct erfInv_helper;
260260

261261
template<typename FloatingPoint>
262-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
263-
struct erfInv_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
262+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
263+
struct erfInv_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
264264
{
265265
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) _x)
266266
{
@@ -311,8 +311,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
311311
struct pow_helper;
312312

313313
template<typename FloatingPoint>
314-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
315-
struct pow_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
314+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
315+
struct pow_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
316316
{
317317
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x, NBL_CONST_REF_ARG(FloatingPoint) y)
318318
{
@@ -362,8 +362,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
362362
struct exp_helper;
363363

364364
template<typename FloatingPoint>
365-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
366-
struct exp_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
365+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
366+
struct exp_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
367367
{
368368
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x)
369369
{
@@ -413,8 +413,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
413413
struct exp2_helper;
414414

415415
template<typename FloatingPoint>
416-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
417-
struct exp2_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
416+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
417+
struct exp2_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
418418
{
419419
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x)
420420
{
@@ -474,8 +474,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
474474
struct log_helper;
475475

476476
template<typename FloatingPoint>
477-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
478-
struct log_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
477+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
478+
struct log_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
479479
{
480480
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x)
481481
{
@@ -525,8 +525,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
525525
struct abs_helper;
526526

527527
template<typename FloatingPoint>
528-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
529-
struct abs_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
528+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
529+
struct abs_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
530530
{
531531
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x)
532532
{
@@ -576,8 +576,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
576576
struct sqrt_helper;
577577

578578
template<typename FloatingPoint>
579-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint>)
580-
struct sqrt_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint>) >
579+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint>)
580+
struct sqrt_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint>) >
581581
{
582582
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x)
583583
{
@@ -613,8 +613,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
613613
struct sin_helper;
614614

615615
template<typename FloatingPoint>
616-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
617-
struct sin_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
616+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
617+
struct sin_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
618618
{
619619
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x)
620620
{
@@ -664,8 +664,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
664664
struct cos_helper;
665665

666666
template<typename FloatingPoint>
667-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
668-
struct cos_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
667+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
668+
struct cos_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
669669
{
670670
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x)
671671
{
@@ -715,8 +715,8 @@ template<typename T NBL_STRUCT_CONSTRAINABLE>
715715
struct acos_helper;
716716

717717
template<typename FloatingPoint>
718-
NBL_PARTIAL_REQ_TOP(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
719-
struct acos_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::floating_point<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
718+
NBL_PARTIAL_REQ_TOP(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4))
719+
struct acos_helper<FloatingPoint NBL_PARTIAL_REQ_BOT(concepts::FloatingPointScalar<FloatingPoint> && (sizeof(FloatingPoint) <= 4)) >
720720
{
721721
static FloatingPoint __call(NBL_CONST_REF_ARG(FloatingPoint) x)
722722
{

0 commit comments

Comments
 (0)