Skip to content

Commit 916c696

Browse files
committed
Fix formatting and add missing SPIR-V prototypes
Signed-off-by: Larsen, Steffen <[email protected]>
1 parent b74bef1 commit 916c696

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

sycl/include/CL/__spirv/spirv_ops.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,20 @@ template <typename ValueT, typename IdT>
10591059
__SYCL_CONVERGENT__ extern __DPCPP_SYCL_EXTERNAL __SYCL_EXPORT ValueT
10601060
__spirv_GroupNonUniformShuffle(__spv::Scope::Flag, ValueT, IdT) noexcept;
10611061

1062+
template <typename ValueT, typename IdT>
1063+
__SYCL_CONVERGENT__ extern __DPCPP_SYCL_EXTERNAL __SYCL_EXPORT ValueT
1064+
__spirv_GroupNonUniformShuffleXor(__spv::Scope::Flag, ValueT, IdT) noexcept;
1065+
1066+
template <typename ValueT, typename IdT>
1067+
__SYCL_CONVERGENT__ extern __DPCPP_SYCL_EXTERNAL __SYCL_EXPORT ValueT
1068+
__spirv_GroupNonUniformShuffleUp(__spv::Scope::Flag, ValueT, IdT) noexcept;
1069+
1070+
template <typename ValueT, typename IdT>
1071+
__SYCL_CONVERGENT__ extern __DPCPP_SYCL_EXTERNAL
1072+
__SYCL_EXPORT ValueT __spirv_GroupNonUniformShuffleDown(__spv::Scope::Flag,
1073+
ValueT,
1074+
IdT) noexcept;
1075+
10621076
__SYCL_CONVERGENT__ extern __DPCPP_SYCL_EXTERNAL __SYCL_EXPORT bool
10631077
__spirv_GroupNonUniformAll(__spv::Scope::Flag, bool);
10641078

sycl/include/sycl/detail/spirv.hpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,8 @@ EnableIfNativeShuffle<T> Shuffle(GroupT g, T x, id<1> local_id) {
875875
convertToOpenCLType(x), LocalId);
876876
} else {
877877
// Subgroup.
878-
return __spirv_GroupNonUniformShuffle(__spv::Scope::Subgroup, convertToOpenCLType(x), LocalId);
878+
return __spirv_GroupNonUniformShuffle(__spv::Scope::Subgroup,
879+
convertToOpenCLType(x), LocalId);
879880
}
880881
#else
881882
if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<
@@ -912,7 +913,9 @@ EnableIfNativeShuffle<T> ShuffleXor(GroupT g, T x, id<1> mask) {
912913
convertToOpenCLType(x), TargetId);
913914
} else {
914915
// Subgroup.
915-
return __spirv_GroupNonUniformShuffleXOR(__spv::Scope::Subgroup, convertToOpenCLType(x), static_cast<uint32_t>(mask.get(0)));
916+
return __spirv_GroupNonUniformShuffleXor(
917+
__spv::Scope::Subgroup, convertToOpenCLType(x),
918+
static_cast<uint32_t>(mask.get(0)));
916919
}
917920
#else
918921
if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<
@@ -959,7 +962,8 @@ EnableIfNativeShuffle<T> ShuffleDown(GroupT g, T x, uint32_t delta) {
959962
convertToOpenCLType(x), TargetId);
960963
} else {
961964
// Subgroup.
962-
return __spirv_GroupNonUniformShuffleDown(__spv::Scope::Subgroup, convertToOpenCLType(x), convertToOpenCLType(x), delta);
965+
return __spirv_GroupNonUniformShuffleDown(__spv::Scope::Subgroup,
966+
convertToOpenCLType(x), delta);
963967
}
964968
#else
965969
if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<
@@ -1002,7 +1006,8 @@ EnableIfNativeShuffle<T> ShuffleUp(GroupT g, T x, uint32_t delta) {
10021006
convertToOpenCLType(x), TargetId);
10031007
} else {
10041008
// Subgroup.
1005-
return __spirv_GroupNonUniformShuffleUp(__spv::Scope::Subgroup, convertToOpenCLType(x), convertToOpenCLType(x), delta);
1009+
return __spirv_GroupNonUniformShuffleUp(__spv::Scope::Subgroup,
1010+
convertToOpenCLType(x), delta);
10061011
}
10071012
#else
10081013
if constexpr (ext::oneapi::experimental::is_user_constructed_group_v<

0 commit comments

Comments
 (0)