Skip to content

[SYCL] Fix __spirv_GroupBroadcast overloads #1152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion sycl/include/CL/__spirv/spirv_ops.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,14 @@ extern bool __spirv_GroupAny(__spv::Scope Execution, bool Predicate) noexcept;

template <typename dataT>
extern dataT __spirv_GroupBroadcast(__spv::Scope Execution, dataT Value,
uint32_t LocalId) noexcept;
size_t LocalId) noexcept;

template <typename dataT>
extern dataT __spirv_GroupBroadcast(__spv::Scope Execution, dataT Value,
__ocl_vec_t<size_t, 2> LocalId) noexcept;
template <typename dataT>
extern dataT __spirv_GroupBroadcast(__spv::Scope Execution, dataT Value,
__ocl_vec_t<size_t, 3> LocalId) noexcept;

template <typename dataT>
extern dataT __spirv_GroupIAdd(__spv::Scope Execution, __spv::GroupOperation Op,
Expand Down
4 changes: 4 additions & 0 deletions sycl/include/CL/__spirv/spirv_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ using RPipeTy = __attribute__((pipe("read_only"))) const dataT;
template <typename dataT>
using WPipeTy = __attribute__((pipe("write_only"))) const dataT;

// OpenCL vector types
template <typename dataT, int dims>
using __ocl_vec_t = dataT __attribute__((ext_vector_type(dims)));

// Struct representing layout of pipe storage
struct ConstantPipeStorage {
int32_t _PacketSize;
Expand Down