From c521a847450033461fa6257aba0b2202bb1d62af Mon Sep 17 00:00:00 2001 From: Peter Colberg Date: Thu, 24 Mar 2022 19:34:39 -0400 Subject: [PATCH] [SYCL][FPGA] prepare future implementation of experimental pipe properties Add a template parameter to pass compile-time constant properties to sycl::ext::intel::experimental::pipe, and redeclare pipe implementation as a specialization when the properties list is empty; otherwise, when the properties list is non-empty, throw a descriptive compiler error. The unnamed template parameter allows implementation of the case where the properties list is non-empty in a downstream, FPGA-specific header, before finalizing pipe properties for inclusion into this header. See draft specification in https://github.com/intel/llvm/pull/5838 --- .../sycl/ext/intel/experimental/pipes.hpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sycl/include/sycl/ext/intel/experimental/pipes.hpp b/sycl/include/sycl/ext/intel/experimental/pipes.hpp index 46494884c29ba..442cea8c93062 100644 --- a/sycl/include/sycl/ext/intel/experimental/pipes.hpp +++ b/sycl/include/sycl/ext/intel/experimental/pipes.hpp @@ -12,6 +12,8 @@ #include #include #include +#include +#include __SYCL_INLINE_NAMESPACE(cl) { namespace sycl { @@ -19,7 +21,19 @@ namespace ext { namespace intel { namespace experimental { -template class pipe { +template +class pipe { + static_assert(std::is_same_v<_propertiesT, + decltype(oneapi::experimental::properties{})>, + "experimental pipe properties are not yet implemented"); +}; + +template +class pipe<_name, _dataT, _min_capacity, _propertiesT, + std::enable_if_t>> { public: // Non-blocking pipes // Reading from pipe is lowered to SPIR-V instruction OpReadPipe via SPIR-V