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

Indexing into an array / lookup table (lut)? #70

Open
fzyzcjy opened this issue Oct 9, 2021 · 0 comments
Open

Indexing into an array / lookup table (lut)? #70

fzyzcjy opened this issue Oct 9, 2021 · 0 comments

Comments

@fzyzcjy
Copy link

fzyzcjy commented Oct 9, 2021

Hi thanks for the lib! My usage needs to index into an array based on a value. Shortly speaking, it is doing something like:

for x in 0..width {
  let a = array_one[x+42] - array_one[x-42]; //???
  let b = ...some arthi op on `a` which I know faster can do...
  let c = array_two[b]; //???
}

Question: How can I parallalize the array indexing operation?
There do exist SIMD intrinsics for such lut(lookup table) operations. I have used OpenCV's universal intrinsics in C++, and it did provide one: https://docs.opencv.org/4.5.3/df/d91/group__core__hal__intrin.html#ga37fe7c336a68ae5f48967a066473a4ff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant