Skip to content

Commit

Permalink
Some other cl::sycl::xilinx to cl::sycl::vendor::xilinx renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
keryell committed May 17, 2018
1 parent c0e985f commit 802b319
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
20 changes: 10 additions & 10 deletions tests/array_partition/array_partition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <CL/sycl.hpp>

using namespace cl::sycl;
using namespace cl::sycl::xilinx::partition;
using namespace cl::sycl::vendor;

constexpr size_t SIZE = 4;

Expand All @@ -37,45 +37,45 @@ using Type = int;
int test_main(int argc, char *argv[]) {
// Construct a partition_array from a list of number
xilinx::partition_array<Type, SIZE> A = {1, 2, 3, 4};
TRISYCL_CHECK(A, type::none, ({1, 2, 3, 4}))
TRISYCL_CHECK(A, xilinx::partition::type::none, ({1, 2, 3, 4}))

// Construct a partition_array from another partition_array of the same size
xilinx::partition_array<Type, SIZE> B { A };
TRISYCL_CHECK(B, type::none, ({1, 2, 3, 4}));
TRISYCL_CHECK(B, xilinx::partition::type::none, ({1, 2, 3, 4}));

// Construct a partition_array from a std::array
std::array<Type, SIZE> toC = {5, 6, 7, 8};
xilinx::partition_array<Type, SIZE> C { toC };
TRISYCL_CHECK(C, type::none, ({5, 6, 7, 8}));
TRISYCL_CHECK(C, xilinx::partition::type::none, ({5, 6, 7, 8}));

// Construct a partition_array by default
xilinx::partition_array<Type, SIZE> D;
D = B;
TRISYCL_CHECK(D, type::none, ({1, 2, 3, 4}));
TRISYCL_CHECK(D, xilinx::partition::type::none, ({1, 2, 3, 4}));

// Cyclic Partition for E
xilinx::partition_array<Type, SIZE,
xilinx::partition::cyclic<SIZE>> E = {1, 2, 3, 4};
TRISYCL_CHECK(E, type::cyclic, ({1, 2, 3, 4}));
TRISYCL_CHECK(E, xilinx::partition::type::cyclic, ({1, 2, 3, 4}));

xilinx::partition_array<Type, SIZE,
xilinx::partition::cyclic<SIZE>> F { E };
TRISYCL_CHECK(F, type::cyclic, ({1, 2, 3, 4}));
TRISYCL_CHECK(F, xilinx::partition::type::cyclic, ({1, 2, 3, 4}));

F = C;

TRISYCL_CHECK(F, type::cyclic, ({5, 6, 7, 8}));
TRISYCL_CHECK(F, xilinx::partition::type::cyclic, ({5, 6, 7, 8}));

// Block Partition for G
xilinx::partition_array<Type, SIZE,
xilinx::partition::block<SIZE>> G = F;
TRISYCL_CHECK(G, type::block, ({5, 6, 7, 8}));
TRISYCL_CHECK(G, xilinx::partition::type::block, ({5, 6, 7, 8}));

// Block Partition for H
xilinx::partition_array<Type, SIZE,
xilinx::partition::complete<>> H;
H = toC;
TRISYCL_CHECK(H, type::complete, ({5, 6, 7, 8}));
TRISYCL_CHECK(H, xilinx::partition::type::complete, ({5, 6, 7, 8}));

return 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ int test_main(int argc, char *argv[]) {

// A typical FPGA-style pipelined kernel
cgh.single_task<class add>([=] {
xilinx::partition_array<Type, BLOCK_SIZE> A;
xilinx::partition_array<Type, BLOCK_SIZE> B;
xilinx::partition_array<Type, BLOCK_SIZE> C;
vendor::xilinx::partition_array<Type, BLOCK_SIZE> A;
vendor::xilinx::partition_array<Type, BLOCK_SIZE> B;
vendor::xilinx::partition_array<Type, BLOCK_SIZE> C;

for (int i = 0 ; i < DIM * DIM; i++) {
A[i] = a_in1[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


using namespace cl::sycl;
using namespace cl::sycl::vendor;

//Parameters Description:
// NUM_ROWS: matrix height
Expand Down

0 comments on commit 802b319

Please sign in to comment.