Streams and Vectors: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
No edit summary
Line 12: Line 12:
== Vectors ==
== Vectors ==


Where ''streams'' carry 1 sample per time instance, ''vectors'' can carry multiple samples per time instance. By analogy, a ''stream'' represents a scalar at each time instance, whereas a vector represents an array at each time instance. ''Vectors'' allow data to be represent and process data in parallel.
''Vectors'' carry multiple samples per time instance, representing data in parallel. By analogy, a ''stream'' represents a scalar at each time instance, whereas a vector represents an array at each time instance.
 
GRC uses darker colors to represent ''vector'' outputs:
 
 




darker color in GRC


* note: use an image
* note: use an image

Revision as of 17:51, 6 January 2022

This tutorial will describe the difference between a Stream and a Vector. You can find the previous tutorial here: Converting Data Types

Streams

Streams in GNU Radio are what convey the information between blocks and are represented by the arrows connecting blocks in a flowgraph. A stream must have a data type, such as Float 32 or Byte. A stream carries 1 sample for each time instance and are used to represent and process serial data.

The Signal Source block produces a Complex Float 32 stream. The output of the block at each time instance contains 1 complex sample:

SignalSourceStreamExample.png


Vectors

Vectors carry multiple samples per time instance, representing data in parallel. By analogy, a stream represents a scalar at each time instance, whereas a vector represents an array at each time instance.

GRC uses darker colors to represent vector outputs:



  • note: use an image