bool read_nb(T & rdata)
This method attempts to read a value from the stream, returning
true
if successful. Otherwise, false
is returned and the queue is unaffected.
// Usage of void read_nb(const T & wdata)
hls::stream<int> my_stream;
int dst_var;
if (my_stream.read_nb(dst_var)) {
// Perform standard operations
...
} else {
// Read did not occur
return;
}