-
Notifications
You must be signed in to change notification settings - Fork 88
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
hadd confusing #6
Comments
Hi @flori-uni, In MIPP we chose that horizontal operations return a scalar (hadd, hmul, etc.). I'm not sure I want to modify this default behavior documented here: https://github.com/aff3ct/MIPP#reductions-horizontal-functions-. |
Well I plan to use the functionality for calculation on complex numbers. In detail for calculating real²+imaginary². The real and imaginary part are in the same memory stored alternating. So I have re,im,re,im... Maybe I'll implement some separated methods for my use-case. Later I probably need also the real and imaginary parts separate... |
mipp::Reduction<T,mipp::add>::apply(v); actually does not result in the right data. I think i need to implement it on my own 😢 |
I'm not sure to understand, what is the result you expect? Could you give me an example? |
Using AVX2 I'm able to do the following:
So it calculates |
|
The reduction method hadd is a bit confusing. In AVX2 this is used for a pairwise add so the result is also a vector not a scalar. Maybe there is the possibility to change the behavior for the other implementations?
MIPP/src/mipp.h
Line 1224 in 6be95bb
The text was updated successfully, but these errors were encountered: