I am using the Xilinx's triSYCL github implementation,https://github.com/triSYCL/triSYCL.
I am trying to create a design with 100 cl::sycl::pipes
each with capacity= 6
. And I am gonna access each pipe through a separate thread in my SYCL code.
Here is what I tried:
constexpr int T = 6;
constexpr int n_threads = 100;
cl::sycl::pipe<cl::sycl::pipe<float>> p { n_threads, cl::sycl::pipe<float> { T } };
for (int j=0; j<n_threads; j++) {
q.submit([&](cl::sycl::handler &cgh) {
// Get write access to the pipe
auto kp = p[j].get_access<cl::sycl::access::mode::write>(cgh);
// Get read access to the data
auto ba = A.get_access<cl::sycl::access::mode::read>(cgh);
cgh.single_task<class producer>([=] () mutable {
for (int i = 0; i != T; i++)
// Try to write to the pipe up to success
while (!kp.write(ba[i]));
});
};
The code is just a copy of tests/pipe/pipe_producer_consumer.cpp
file on the github repository. I have just added a for loop
on it to parallely instantiate multiple threads.
I am getting multiple errors in this: error: no matching function for call to ‘cl::sycl::pipe<cl::sycl::pipe<float> >::pipe(<brace-enclosed initializer list>)’
cl::sycl::pipe<cl::sycl::pipe<float>> p { n_threads, cl::sycl::pipe<float> { T } };