Skip to content

[SYCL][FPGA] Enhance document, add an alias to fpga_reg in namespace intelfpga #543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion sycl/doc/extensions/intel_fpga/fpga_reg.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FPGA reg

Intel FPGA extension fpga_reg() is implemented in header file
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.
Expand Down
4 changes: 2 additions & 2 deletions sycl/doc/extensions/intel_fpga/fpga_selector.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ one FPGA board installed in their system (one device per platform).
#include <CL/sycl/intel/fpga_device_selector.hpp>
...
// force FPGA hardware device
cl::sycl::queue deviceQueue(cl::sycl::intel::fpga_selector{});
cl::sycl::queue deviceQueue{cl::sycl::intel::fpga_selector{}};
...
```

Expand All @@ -22,6 +22,6 @@ cl::sycl::queue deviceQueue(cl::sycl::intel::fpga_selector{});
#include <CL/sycl/intel/fpga_device_selector.hpp>
...
// force FPGA emulation device
cl::sycl::queue deviceQueue(cl::sycl::intel::fpga_emulator_selector{});
cl::sycl::queue deviceQueue{cl::sycl::intel::fpga_emulator_selector{}};
...
```
2 changes: 1 addition & 1 deletion sycl/include/CL/sycl/intel/fpga_device_selector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace cl {
namespace sycl {
namespace intel {

class platform_selector : public default_selector {
class platform_selector : public device_selector {
private:
std::string device_platform_name;

Expand Down
2 changes: 1 addition & 1 deletion sycl/include/CL/sycl/intel/fpga_extensions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

#pragma once
#include <CL/sycl/intel/fpga_device_selector.hpp>
#include <CL/sycl/intel/fpga_reg.hpp>
#include <CL/sycl/intel/fpga_reg.hpp>
8 changes: 8 additions & 0 deletions sycl/include/CL/sycl/intel/fpga_reg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ template <typename T> T fpga_reg(const T &t) {
} // namespace intel
} // namespace sycl
} // namespace cl

// Keep it consistent with FPGA attributes like intelfpga::memory()
// Currently clang does not support nested namespace for attributes
namespace intelfpga {
template <typename T> T fpga_reg(const T &t) {
return cl::sycl::intel::fpga_reg(t);
}
}