Skip to content

Commit 0f8c062

Browse files
committed
bitonic sort acessor added
1 parent 8429b4b commit 0f8c062

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#ifndef _NBL_BUILTIN_HLSL_CONCEPTS_ACCESSORS_BITONIC_SORT_INCLUDED_
2+
#define _NBL_BUILTIN_HLSL_CONCEPTS_ACCESSORS_BITONIC_SORT_INCLUDED_
3+
4+
#include "nbl/builtin/hlsl/concepts/accessors/generic_shared_data.hlsl"
5+
6+
namespace nbl
7+
{
8+
namespace hlsl
9+
{
10+
namespace workgroup
11+
{
12+
namespace bitonic_sort
13+
{
14+
// The SharedMemoryAccessor MUST provide the following methods:
15+
// * void get(uint32_t index, NBL_REF_ARG(uint32_t) value);
16+
// * void set(uint32_t index, in uint32_t value);
17+
// * void workgroupExecutionAndMemoryBarrier();
18+
template<typename T, typename V = uint32_t, typename I = uint32_t>
19+
NBL_BOOL_CONCEPT BitonicSortSharedMemoryAccessor = concepts::accessors::GenericSharedMemoryAccessor<T, V, I>;
20+
21+
// The Accessor MUST provide the following methods:
22+
// * void get(uint32_t index, NBL_REF_ARG(pair<KeyType, ValueType>) value);
23+
// * void set(uint32_t index, in pair<KeyType, ValueType> value);
24+
template<typename T, typename KeyType, typename ValueType, typename I = uint32_t>
25+
NBL_BOOL_CONCEPT BitonicSortAccessor = concepts::accessors::GenericDataAccessor<T, pair<KeyType, ValueType>, I>;
26+
27+
}
28+
}
29+
}
30+
}
31+
#endif

0 commit comments

Comments
 (0)