Skip to content
Merged
Changes from 1 commit
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
7 changes: 3 additions & 4 deletions sycl/include/CL/sycl/INTEL/fpga_reg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ namespace INTEL {
// Returns a registered copy of the input
// This function is intended for FPGA users to instruct the compiler to insert
// at least one register stage between the input and the return value.
template <typename _T>
typename std::enable_if<std::is_trivially_copyable<_T>::value, _T>::type
fpga_reg(_T t) {
template <typename _T> _T fpga_reg(_T t) {
static_assert(std::is_trivially_copyable<_T>::value,
"Type is not trivially_copyable.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that looks simple and understandable. :-)

#if __has_builtin(__builtin_intel_fpga_reg)
return __builtin_intel_fpga_reg(t);
#else
Expand All @@ -31,4 +31,3 @@ fpga_reg(_T t) {
} // namespace INTEL
} // namespace sycl
} // __SYCL_INLINE_NAMESPACE(cl)