@@ -32,33 +32,25 @@ int main() {
32
32
bool passed = false ;
33
33
34
34
try {
35
- // This design is tested with 2023.0, but also accounts for a syntax change in
36
- // 2023.1
37
- #if __INTEL_CLANG_COMPILER >= 20230100
35
+
36
+ // Use compile-time macros to select either:
37
+ // - the FPGA emulator device (CPU emulation of the FPGA)
38
+ // - the FPGA device (a real FPGA)
39
+ // - the simulator device
38
40
#if FPGA_SIMULATOR
39
41
auto selector = sycl::ext::intel::fpga_simulator_selector_v;
40
42
#elif FPGA_HARDWARE
41
43
auto selector = sycl::ext::intel::fpga_selector_v;
42
44
#else // #if FPGA_EMULATOR
43
45
auto selector = sycl::ext::intel::fpga_emulator_selector_v;
44
46
#endif
45
- #elif __INTEL_CLANG_COMPILER >= 20230000
46
- #if FPGA_SIMULATOR
47
- auto selector = sycl::ext::intel::fpga_simulator_selector{};
48
- #elif FPGA_HARDWARE
49
- auto selector = sycl::ext::intel::fpga_selector{};
50
- #else // #if FPGA_EMULATOR
51
- auto selector = sycl::ext::intel::fpga_emulator_selector{};
52
- #endif
53
- #else
54
- assert (false ) && " this design requires oneAPI 2023.0 or 2023.1!"
55
- #endif
56
47
57
48
sycl::queue q (selector, fpga_tools::exception_handler,
58
49
sycl::property::queue::enable_profiling{});
59
50
60
51
auto device = q.get_device ();
61
52
53
+ // make sure the device supports USM host allocations
62
54
if (!device.has (sycl::aspect::usm_host_allocations)) {
63
55
std::cerr << " This design must either target a board that supports USM "
64
56
" Host/Shared allocations, or IP Component Authoring. "
0 commit comments