Skip to content

Commit 60ec960

Browse files
domiyanbader
authored andcommitted
[SYCL][FPGA] Enhance document, add an alias to fpga_reg in namespace intelfpga
Signed-off-by: Domi Yan <[email protected]>
1 parent 9c3d98d commit 60ec960

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

sycl/doc/extensions/intel_fpga/fpga_reg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# FPGA reg
22

3-
Intel FPGA extension fpga_reg() is implemented in header file
3+
Intel FPGA extension `fpga_reg()` is implemented in header file
44
`#include <CL/sycl/intel/fpga_extensions.hpp>`.
55

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

sycl/doc/extensions/intel_fpga/fpga_selector.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ one FPGA board installed in their system (one device per platform).
1313
#include <CL/sycl/intel/fpga_device_selector.hpp>
1414
...
1515
// force FPGA hardware device
16-
cl::sycl::queue deviceQueue(cl::sycl::intel::fpga_selector{});
16+
cl::sycl::queue deviceQueue{cl::sycl::intel::fpga_selector{}};
1717
...
1818
```
1919
@@ -22,6 +22,6 @@ cl::sycl::queue deviceQueue(cl::sycl::intel::fpga_selector{});
2222
#include <CL/sycl/intel/fpga_device_selector.hpp>
2323
...
2424
// force FPGA emulation device
25-
cl::sycl::queue deviceQueue(cl::sycl::intel::fpga_emulator_selector{});
25+
cl::sycl::queue deviceQueue{cl::sycl::intel::fpga_emulator_selector{}};
2626
...
2727
```

sycl/include/CL/sycl/intel/fpga_device_selector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace cl {
1414
namespace sycl {
1515
namespace intel {
1616

17-
class platform_selector : public default_selector {
17+
class platform_selector : public device_selector {
1818
private:
1919
std::string device_platform_name;
2020

sycl/include/CL/sycl/intel/fpga_extensions.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99
#pragma once
1010
#include <CL/sycl/intel/fpga_device_selector.hpp>
11-
#include <CL/sycl/intel/fpga_reg.hpp>
11+
#include <CL/sycl/intel/fpga_reg.hpp>

sycl/include/CL/sycl/intel/fpga_reg.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@ template <typename T> T fpga_reg(const T &t) {
2323
} // namespace intel
2424
} // namespace sycl
2525
} // namespace cl
26+
27+
// Keep it consistent with FPGA attributes like intelfpga::memory()
28+
// Currently clang does not support nested namespace for attributes
29+
namespace intelfpga {
30+
template <typename T> T fpga_reg(const T &t) {
31+
return cl::sycl::intel::fpga_reg(t);
32+
}
33+
}

0 commit comments

Comments
 (0)