Skip to content

Commit

Permalink
Update the Xilinx namespace to go under vendor
Browse files Browse the repository at this point in the history
Prepare for the future.
Use also more C++17 syntax for namespace introduction.
  • Loading branch information
keryell committed May 17, 2018
1 parent 95f57c1 commit 6fac20e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
6 changes: 1 addition & 5 deletions include/CL/sycl/vendor/Xilinx/opt_decorate_func.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
@{
*/

namespace cl {
namespace sycl {
namespace xilinx {
namespace cl::sycl::vendor::xilinx {

/** Apply dataflow execution on functions or loops
Expand Down Expand Up @@ -57,8 +55,6 @@ void pipeline(Functor f) noexcept {
}


}
}
}

/// @} End the Xilinx Doxygen group
Expand Down
6 changes: 1 addition & 5 deletions include/CL/sycl/vendor/Xilinx/partition_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
@{
*/

namespace cl {
namespace sycl {
namespace xilinx {
namespace cl::sycl::vendor::xilinx {

/** Kind of array partition
Expand Down Expand Up @@ -244,8 +242,6 @@ struct partition_array {

/// @} End the Xilinx Doxygen group

}
}
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ int test_main(int argc, char *argv[]) {
] {
int buffer_in[BLOCK_SIZE];
int buffer_out[BLOCK_SIZE];
vendor::dataflow([&] {
vendor::xilinx::dataflow([&] {
readInput(buffer_in, d_b);
compute(buffer_in, buffer_out);
writeOutput(buffer_out, d_a);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ template<typename T, typename U>
void readInput(T (&buffer_in)[BLOCK_SIZE], const U &d_b) {
for(int i = 0; i < NUM_ROWS; ++i) {
for (int j = 0; j < WORD_PER_ROW; ++j) {
vendor::pipeline([&] {
vendor::xilinx::pipeline([&] {
buffer_in[WORD_PER_ROW*i+j] = d_b[WORD_PER_ROW*i+j];
});
}
Expand All @@ -39,7 +39,7 @@ template<typename T, typename U>
void compute(T (&buffer_in)[BLOCK_SIZE], U (&buffer_out)[BLOCK_SIZE]) {
for(int i = 0; i < NUM_ROWS; ++i) {
for (int j = 0; j < WORD_PER_ROW; ++j) {
vendor::pipeline([&] {
vendor::xilinx::pipeline([&] {
int inTmp = buffer_in[WORD_PER_ROW*i+j];
int outTmp = inTmp * ALPHA;
buffer_out[WORD_PER_ROW*i+j] = outTmp;
Expand All @@ -52,7 +52,7 @@ template<typename T, typename U>
void writeOutput(T (&buffer_out)[BLOCK_SIZE], const U &d_a) {
for(int i = 0; i < NUM_ROWS; ++i) {
for (int j = 0; j < WORD_PER_ROW; ++j) {
vendor::pipeline([&] {
vendor::xilinx::pipeline([&] {
d_a[WORD_PER_ROW*i+j] = buffer_out[WORD_PER_ROW*i+j];
});
}
Expand Down Expand Up @@ -118,7 +118,7 @@ int test_main(int argc, char *argv[]) {
] {
int buffer_in[BLOCK_SIZE];
int buffer_out[BLOCK_SIZE];
vendor::dataflow([&] {
vendor::xilinx::dataflow([&] {
readInput(buffer_in, d_b);
compute(buffer_in, buffer_out);
writeOutput(buffer_out, d_a);
Expand Down

0 comments on commit 6fac20e

Please sign in to comment.