This method attempts to push variable src_var
into the stream my_stream
, returning a boolean true
if successful. Otherwise, false
is returned and the queue is unaffected.
// Usage of void write_nb(const T & wdata)
hls::stream<int> my_stream;
int src_var = 42;
if (my_stream.write_nb(src_var)) {
// Perform standard operations
...
} else {
// Write did not occur
return;
}