1
1
#ifndef _NBL_BUILTIN_HLSL_CONCEPTS_ACCESSORS_WORKGROUP_ARITHMETIC_INCLUDED_
2
2
#define _NBL_BUILTIN_HLSL_CONCEPTS_ACCESSORS_WORKGROUP_ARITHMETIC_INCLUDED_
3
3
4
- #include "nbl/builtin/hlsl/concepts.hlsl"
4
+ #include "nbl/builtin/hlsl/concepts/accessors/generic_shared_data .hlsl"
5
5
6
6
namespace nbl
7
7
{
@@ -10,46 +10,30 @@ namespace hlsl
10
10
namespace workgroup2
11
11
{
12
12
13
- #define NBL_CONCEPT_NAME ArithmeticSharedMemoryAccessor
14
- #define NBL_CONCEPT_TPLT_PRM_KINDS (typename)
15
- #define NBL_CONCEPT_TPLT_PRM_NAMES (T)
16
- #define NBL_CONCEPT_PARAM_0 (accessor, T)
17
- #define NBL_CONCEPT_PARAM_1 (index, uint32_t)
18
- #define NBL_CONCEPT_PARAM_2 (val, uint32_t)
19
- NBL_CONCEPT_BEGIN (3 )
20
- #define accessor NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_0
21
- #define index NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
22
- #define val NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
23
- NBL_CONCEPT_END (
24
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template set<uint32_t>(index, val)), is_same_v, void ))
25
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template get<uint32_t>(index, val)), is_same_v, void ))
26
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.workgroupExecutionAndMemoryBarrier ()), is_same_v, void ))
27
- );
28
- #undef val
29
- #undef index
30
- #undef accessor
31
- #include <nbl/builtin/hlsl/concepts/__end.hlsl>
13
+ template<typename T, typename V, typename I>
14
+ NBL_BOOL_CONCEPT ArithmeticSharedMemoryAccessor = concepts::accessors::GenericSharedMemoryAccessor<T,V,I>;
32
15
33
- #define NBL_CONCEPT_NAME ArithmeticDataAccessor
34
- #define NBL_CONCEPT_TPLT_PRM_KINDS (typename)
35
- #define NBL_CONCEPT_TPLT_PRM_NAMES (T)
16
+ #define NBL_CONCEPT_NAME ArithmeticReadOnlyDataAccessor
17
+ #define NBL_CONCEPT_TPLT_PRM_KINDS (typename)(typename)
18
+ #define NBL_CONCEPT_TPLT_PRM_NAMES (T)(V)
36
19
#define NBL_CONCEPT_PARAM_0 (accessor, T)
37
20
#define NBL_CONCEPT_PARAM_1 (index, uint32_t)
38
- #define NBL_CONCEPT_PARAM_2 (val, uint32_t )
21
+ #define NBL_CONCEPT_PARAM_2 (val, V )
39
22
NBL_CONCEPT_BEGIN (3 )
40
23
#define accessor NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_0
41
24
#define index NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_1
42
25
#define val NBL_CONCEPT_PARAM_T NBL_CONCEPT_PARAM_2
43
26
NBL_CONCEPT_END (
44
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template set<uint32_t>(index, val)), is_same_v, void ))
45
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template get<uint32_t>(index, val)), is_same_v, void ))
46
- ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.workgroupExecutionAndMemoryBarrier ()), is_same_v, void ))
27
+ ((NBL_CONCEPT_REQ_EXPR_RET_TYPE)((accessor.template get<V>(index, val)), is_same_v, void ))
47
28
);
48
29
#undef val
49
30
#undef index
50
31
#undef accessor
51
32
#include <nbl/builtin/hlsl/concepts/__end.hlsl>
52
33
34
+ template<typename T, typename V, typename I=uint32_t>
35
+ NBL_BOOL_CONCEPT ArithmeticDataAccessor = concepts::accessors::GenericDataAccessor<T,V,I>;
36
+
53
37
}
54
38
}
55
39
}
0 commit comments