Giter Club home page Giter Club logo

Comments (4)

GabeRundlett avatar GabeRundlett commented on May 20, 2024

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.

nemequ avatar nemequ commented on May 20, 2024

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.

nemequ avatar nemequ commented on May 20, 2024

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.

nemequ avatar nemequ commented on May 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.