Skip to content

Commit 8585116

Browse files
[SYCL] Make SYCL 2020 style FPGA selectors inline (#7187)
The SYCL 2020 style FPGA selectors (`fpga_selector_v`, `fpga_emulator_selector_v`, and `fpga_simulator_selector_v`) were not previously marked inline which may cause failures in the linker due to multiple definitions. This commit makes them inline. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 9c45a93 commit 8585116

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sycl/include/sycl/ext/intel/fpga_device_selector.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ static constexpr auto EMULATION_PLATFORM_NAME =
6161
static constexpr auto HARDWARE_PLATFORM_NAME =
6262
"Intel(R) FPGA SDK for OpenCL(TM)";
6363

64-
int fpga_selector_v(const device &device) {
64+
inline int fpga_selector_v(const device &device) {
6565
return detail::selectDeviceByPlatform(HARDWARE_PLATFORM_NAME, device);
6666
}
6767

68-
int fpga_emulator_selector_v(const device &device) {
68+
inline int fpga_emulator_selector_v(const device &device) {
6969
return detail::selectDeviceByPlatform(EMULATION_PLATFORM_NAME, device);
7070
}
7171

72-
int fpga_simulator_selector_v(const device &device) {
72+
inline int fpga_simulator_selector_v(const device &device) {
7373
static bool IsFirstCall = true;
7474
if (IsFirstCall) {
7575
detail::enableFPGASimulator();

0 commit comments

Comments
 (0)