Comments (4)
In my original post on SO, I intend to use SIMD in an overloaded operator function to add two mathematical vectors together. Although this makes the addition fast at runtime, since I'm using SIMD in these functions, I cannot use the operators with constexpr variables. This forces simply evaluabe vectors that are comprised of some combination of expressions using these overloaded operators to be evaluated at runtime, which is not optimal.
from simde.
I understand what constexpr
does, and what you're trying to do. What I'm trying to figure out is whether there is really a practical application, or do you just think it would be a cool feature (which I agree with, but I don't think is enough of a reason to justify the amount of effort involved).
People don't generally have a lot of data available at compile-time, and if you do you should probably be pre-processing it instead of relying on the compiler and constexpr
. So the only time I can really see this coming in handy is if you have a very hot loop that changes depending on a compile-time parameter in a non-trivial way, which isn't something I see in the wild very often at all.
from simde.
I just realized that may have sounded a bit snarky, which isn't what I intended. I think this is an interesting idea, I'm just having trouble thinking of a reason you would want to do what you described that wouldn't be better addressed by a different solution.
If there is something I'm missing I'd definitely consider implementing this, I just don't want to do something that would add a lot of complexity to SIMDe without a good reason.
from simde.
I'm going to close this, but I'm still open to the idea if anyone can convince me that it's worth the additional complication.
In the meantime, maybe Iris might be more open to this? The depend pretty heavily on templates so you wouldn't need to modify nearly as many places as for SIMD. Unfortunately they don't have the code that SIMDe does for accelerating one ISA extension with another, or AFAIK even a native implementation (though I could be wrong about that part).
from simde.
Related Issues (20)
- 3DNow! functions HOT 4
- Add explanation on how to use the RISCV vector implementations to the README HOT 1
- Build failures under Xcode 15 HOT 7
- re-implement some of the FCVTZS/FCVTMS/FCVTPS/FCVTNS HOT 1
- Warning/error when using simde on clang 17 HOT 5
- VAES functions (AVX512 related)
- SSE4a functions
- FMA4 functions
- x87 functions HOT 6
- Extended MMX (Cyrix EMMI) functions
- BMI1 functions HOT 1
- BMI2 functions
- ADX functions
- TBM functions (XOP related)
- LWP functions (XOP related) HOT 4
- CLMUL - remaining functions HOT 2
- MMX/SSE related functions HOT 5
- Release 0.8.2 HOT 2
- reimplement the removed FCVTZS/FCVTMS/FCVTPS/FCVTNS family intrinsics HOT 1
- Compiling for RISC-V? 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 simde.