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

Add 4ic deinterleave to 8i x2 #398

Open
dkozel opened this issue Jul 31, 2020 · 2 comments
Open

Add 4ic deinterleave to 8i x2 #398

dkozel opened this issue Jul 31, 2020 · 2 comments
Labels
Enhancement new kernel entirely or for some specific ARCH

Comments

@dkozel
Copy link

dkozel commented Jul 31, 2020

I think this can be done pretty efficiently, if bytewise arithmetic shift operators exist. Otherwise its probably just loop unrolling? The volk_8ic_deinterleave_16i_x2 kernels are much more complicated than I expected though so I'm probably not aware of a lot of nuances of available SIMD operations.

uint8_t input[size];
uint8_t out_1[size];
uint8_t out_2[size];

for (int i = 0; i < size; i++) {
    out_1[i] = input[i] << 4;
    out_1[i] = out_1[i] >> 4;
    out_2[i] = input[i] >> 4;
}
@dkozel dkozel added the Enhancement new kernel entirely or for some specific ARCH label Jul 31, 2020
@jdemel
Copy link
Contributor

jdemel commented Aug 2, 2020

So let's see, you propose a new kernel volk_4ic_deinterleave_8i_x2?
Do you have a use case? I have an idea how to use such low resolution values. But I'd suggest a LUT instead of shifts.
Are you willing to implement a first kernel?

@dkozel
Copy link
Author

dkozel commented Aug 4, 2020

@jdemel Yes, I'm writing blocks for a Radio Astronomy acquisition board which stream packed signed 4bit IQ data. Yes. I'll put up a PR shortly with nearly complete generic and SSE2 kernels, though I have some uncertainty about dispatchers and input datatypes as there isn't a native 4bit type in C++.

@jdemel jdemel linked a pull request Oct 21, 2020 that will close this issue
@jdemel jdemel changed the title Add 4ic deinterleve to 8i x2 Add 4ic deinterleave to 8i x2 Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement new kernel entirely or for some specific ARCH
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants