bgottula / noodles

Framework for DSP flowgraphs.
MIT License
1 stars 0 forks source link

Tasks: type system #30

Open jgottula opened 10 years ago

jgottula commented 10 years ago

making it work

bgottula commented 9 years ago

Wanted to double-check that the type system supports an important case I hadn't thought of until today. For some DSP operations, there is a notion of framing where data is processed in discrete frames with well-defined boundaries. In other words, not only does the block need to process N samples at a time, but those N samples need to be aligned to frame boundaries. Examples could include images, block codes, OSI Layer 2 frame structures, etc. For these types of DSP operations, it is more convenient to keep all the samples belonging to a frame together and pass them around as a discrete unit, rather than trying to attach some kind of metadata to identify the frame boundaries. For example, a frame could be a vector<int64_t> of some size. Noodles doesn't need to enforce or even know about the size of these vectors, but it would just treat each vector like it's a single sample. I'm pretty sure this should "just work," but I wanted to double check.

jgottula commented 9 years ago

I think it'll "just work". But I have been working under the assumption that we would be safe to use sample types by-value (i.e. copying and whatnot), which could potentially be slow/dumb for vector<>.

On Thursday, December 11, 2014, Brett Gottula notifications@github.com wrote:

Wanted to double-check that the type system supports an important case I hadn't thought of until today. For some DSP operations, there is a notion of framing where data is processed in discrete frames with well-defined boundaries. In other words, not only does the block need to process N samples at a time, but those N samples need to be aligned to frame boundaries. Examples could include images, block codes, OSI Layer 2 frame structures, etc. For these types of DSP operations, it is more convenient to keep all the samples belonging to a frame together and pass them around as a discrete unit, rather than trying to attach some kind of metadata to identify the frame boundaries. For example, a frame could be a vector of some size. Noodles doesn't need to enforce or even know about the size of these vectors, but it would just treat each vector like it's a single sample. I'm pretty sure this should "just work," but I wanted to double check.

— Reply to this email directly or view it on GitHub https://github.com/bgottula/noodles/issues/30#issuecomment-66679947.