1
1
#ifndef _NBL_BUILTIN_HLSL_CONCEPTS_ACCESSORS_FFT_INCLUDED_
2
2
#define _NBL_BUILTIN_HLSL_CONCEPTS_ACCESSORS_FFT_INCLUDED_
3
3
4
- #include "nbl/builtin/hlsl/concepts.hlsl"
4
+ #include "nbl/builtin/hlsl/concepts/accessors/generic_shared_data .hlsl"
5
5
#include "nbl/builtin/hlsl/fft/common.hlsl"
6
6
7
7
namespace nbl
@@ -17,49 +17,15 @@ namespace fft
17
17
// * void set(uint32_t index, in uint32_t value);
18
18
// * void workgroupExecutionAndMemoryBarrier();
19
19
20
- #define NBL_CONCEPT_NAME FFTSharedMemoryAccessor
21
- #define NBL_CONCEPT_TPLT_PRM_KINDS (typename)
22
- #define NBL_CONCEPT_TPLT_PRM_NAMES (T)
23
- #define NBL_CONCEPT_PARAM_0 (accessor, T)
24
- #define NBL_CONCEPT_PARAM_1 (index, uint32_t)
25
- #define NBL_CONCEPT_PARAM_2 (val, uint32_t)
26
- NBL_CONCEPT_BEGIN (3 )
27
- #define accessor NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_0
28
- #define index NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
29
- #define val NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
30
- NBL_CONCEPT_END (
31
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template set<uint32_t, uint32_t>(index, val)), is_same_v, void ))
32
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template get<uint32_t, uint32_t>(index, val)), is_same_v, void ))
33
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.workgroupExecutionAndMemoryBarrier ()), is_same_v, void ))
34
- );
35
- #undef val
36
- #undef index
37
- #undef accessor
38
- #include <nbl/builtin/hlsl/concepts/__end.hlsl>
39
-
20
+ template<typename T, typename V=uint32_t, typename I=uint32_t>
21
+ NBL_BOOL_CONCEPT FFTSharedMemoryAccessor = concepts::accessors::GenericSharedMemoryAccessor<T,V,I>;
40
22
41
23
// The Accessor (for a small FFT) MUST provide the following methods:
42
24
// * void get(uint32_t index, NBL_REF_ARG(complex_t<Scalar>) value);
43
25
// * void set(uint32_t index, in complex_t<Scalar> value);
44
26
45
- #define NBL_CONCEPT_NAME FFTAccessor
46
- #define NBL_CONCEPT_TPLT_PRM_KINDS (typename)(typename)
47
- #define NBL_CONCEPT_TPLT_PRM_NAMES (T)(Scalar)
48
- #define NBL_CONCEPT_PARAM_0 (accessor, T)
49
- #define NBL_CONCEPT_PARAM_1 (index, uint32_t)
50
- #define NBL_CONCEPT_PARAM_2 (val, complex_t<Scalar>)
51
- NBL_CONCEPT_BEGIN (3 )
52
- #define accessor NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_0
53
- #define index NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
54
- #define val NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
55
- NBL_CONCEPT_END (
56
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template set<complex_t<Scalar> >(index, val)), is_same_v, void ))
57
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template get<complex_t<Scalar> >(index, val)), is_same_v, void ))
58
- );
59
- #undef val
60
- #undef index
61
- #undef accessor
62
- #include <nbl/builtin/hlsl/concepts/__end.hlsl>
27
+ template<typename T, typename Scalar, typename I=uint32_t>
28
+ NBL_BOOL_CONCEPT FFTAccessor = concepts::accessors::GenericDataAccessor<T,complex_t<Scalar>,I>;
63
29
64
30
}
65
31
}
0 commit comments