Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 692 Bytes

FPGAReg.md

File metadata and controls

31 lines (22 loc) · 692 Bytes

FPGA reg

Intel FPGA extension fpga_reg() is implemented in header file #include <CL/sycl/intel/fpga_extensions.hpp>.

fpga_reg is used to help compiler infer that at least one register is on the corresponding data path.

Implementation

The implementation is a wrapper class to map fpga_reg function call to a Clang built-in __builtin_intel_fpga_reg() only when parsing for SYCL device code.

#if __has_builtin(__builtin_intel_fpga_reg)
  return __builtin_intel_fpga_reg(t);
#else
  return t;
#endif

Usage

#include <CL/sycl/intel/fpga_extensions.hpp>
...
// force at least one register on data path
int a = cl::sycl::intel::fpga_reg(a[k]) + b[k];

...