Skip to content

Commit

Permalink
Modernize implementation of Xilinx extension decorations with generic…
Browse files Browse the repository at this point in the history
… lambdas
  • Loading branch information
keryell committed May 17, 2018
1 parent 6fac20e commit c0e985f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions include/CL/sycl/vendor/Xilinx/opt_decorate_func.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@ namespace cl::sycl::vendor::xilinx {
\param[in] f is a function that functions or loops in f will be executed
in a dataflow manner.
*/
template <typename Functor>
void dataflow(Functor f) noexcept {
auto dataflow = [] (auto functor) noexcept {
/* SSDM instruction is inserted before the argument functor to guide xocc to
do dataflow. */
_ssdm_op_SpecDataflowPipeline(-1, "");
f();
}
functor();
};


/** Execute loops in a pipelined manner
Expand All @@ -46,13 +45,12 @@ void dataflow(Functor f) noexcept {
\param[in] f is a function with an innermost loop to be executed in a
pipeline way.
*/
template <typename Functor>
void pipeline(Functor f) noexcept {
auto pipeline = [] (auto functor) noexcept {
/* SSDM instruction is inserted before the argument functor to guide xocc to
do pipeline. */
_ssdm_op_SpecPipeline(1, 1, 0, 0, "");
f();
}
functor();
};


}
Expand Down

0 comments on commit c0e985f

Please sign in to comment.