Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion support #49

Closed
guruofquality opened this issue Nov 4, 2015 · 0 comments
Closed

Conversion support #49

guruofquality opened this issue Nov 4, 2015 · 0 comments

Comments

@guruofquality
Copy link
Contributor

One of the patterns that have come up is that many devices support complex bytes or shorts, and we end up duplicating conversions to support other stream formats for the read/writeStream API. Conversion support routines would provide a standard set of stream formats and conversions between formats for any module. The SoapySDR conversion routines would also be optimized in some cases SIMD or lookup tables (for example we have duplicated neon routines on some of the arm boards).

Conversion.hpp would provide calls to:

  1. given a native format, get a list of source formats that we can convert from
  2. given a native format, get a list of target formats that we can convert to
  3. given a source format and destination format, get a pointer to the conversion function

Implementation

  • The default getStreamFormats API can use the first two calls to populate the list of supported formats given the native format. Otherwise, client modules can manually make this call as well.
  • The setupStream() in a client module should use the third call to stash a function pointer. This function pointer will be invoked in the respective read/writeStream() API calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants