Skip to content

channel-major vs frame-major? #59

@ssfrr

Description

@ssfrr

Given that there are likely a number of breaking changes coming down the pike, this might be a good time to think about whether keeping each channel's data contiguous is the right design.

Pros of channel-major:

  • operations that run across an individual channel are fast (memory locality and SIMD-able)
  • We usually think of Vectors as being vertical, which means that 1D SampleBufs and 1-channel 2D (Nx1) SampleBufs map onto each other. That said, I've always found that distinction to be a bit awkward anyways.

Pros of frame-major:

  • Keeping each frame contiguous would be more compatible with streaming data, which is fundamentally interleaved
  • time-slices of a multichannel signal would be contiguous

There are probably other pros and cons I'm not thinking of right now. I just wanted to mark this to see if anyone had thoughts, given that there's a bit of activity lately.

cc @mchitre @haberdashPI

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions