0
votes

I'm using OCL pipes to pass data across kernels, but would need to clear the pipes after each pass so new data could go in. Is it possible to somehow clear the pipes with each run or does it clear itself each time I use the 'write_pipe' function?

I'm doing essentially this, and I will only be using one pipe ideally:

kernel1{
 //read data from host, then write to pipe
}

do..x times
kernel2{
 //read pipe
 //calculations
 //write pipe
}

kernel3{
 //read pipe
 //write to host
}
1

1 Answers

1
votes

A pipe is a FIFO memory object and gets cleared once you read it.

Note also that a given kernel can either read from or write to a pipe, but not both.

You can read more about pipes + example here