Comments (6)
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-.
But if you need a vector instead of a scalar, you can write mipp::Reduction<T,mipp::add<T>>::apply(v);
(apply
instead of sapply
) in your code.
from mipp.
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...
from mipp.
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 😢
from mipp.
I'm not sure to understand, what is the result you expect? Could you give me an example?
from mipp.
Using AVX2 I'm able to do the following:
for (auto idx = 0u; idx < max - 3; idx += 4)
{
auto item = _mm256_load_ps(&data[idx]);
item = _mm256_mul_ps(item, item );
auto mag = _mm256_hadd_ps(item, zeros);
sum = _mm256_add_ps(sum, _mm256_sqrt_ps(mag));
}
auto totalSum = sum[0] + sum[1] + sum[4] + sum[5];
So it calculates sqrt(x*x+y*y)
for each complex pair. Afterwards i can calculate the mean of the sum and some other stuff
from mipp.
[1, 2, 3, 4, 5, 6, 7, 8]
* [1, 2, 3, 4, 5, 6, 7, 8]
[1, 4, 9, 16, 25, 36, 49, 64]
hadd[5, 0, 25, 0, 61, 0,113, 0,]
sqrt[.............................]
from mipp.
Related Issues (20)
- Is mipp::vector using SIMD?
- overflow warnings with GCC HOT 1
- the function "mipp::N<float>()" HOT 1
- Plan for ARM SVE support HOT 2
- Query about uint8 support HOT 2
- Request: Compile Time failure instead of Runtime failure
- Lzcnt/popcnt functions? HOT 4
- All-in-one header HOT 3
- function with constexpr mipp::Reg<float> return is refused
- mipp::cvt<int16_t,int32_t> failure HOT 6
- Doubt regarding horizontal sum in MIPP HOT 2
- testz() not working properly on AVX512
- Question: mipp::set<1> (NO_INTRINSICS) is undefined
- Question: Is there any version plan for this library HOT 1
- Can you add an example about image processing? HOT 1
- mipp::mul<int64_t> (AVX512) is undefined! HOT 1
- sizeof(reg_2<xxx>) return 64 instead of 32 with AVX512 HOT 1
- Arm NEON add HOT 2
- __PRETTY_FUNCTION__ macro is not defined by MSVC
- Include dirs not set correctly for BUILD_INTERFACE, and alias target for MIPP::mipp not set HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mipp.