4 ms·
That doesn't give you run-time dispatch based on available hardware capabilities. So you either need virtual functions (and take the associated perf hit), or so
by grandinj 8y ago
That doesn't give you run-time dispatch based on available hardware capabilities. So you either need virtual functions (and take the associated perf hit), or some other solution like the linker tricks mentions, or cached JIT, or....
- stochastic_monk 8y agoIt’s not runtime, it’s compile-time. That means it needs to be separately compiled for each hardware backend.
- grandinj 8y agoHow do you combine the separately compiled libraries into a single deliverable library/executable? Because that is what the original article is aiming for.
- stochastic_monk 8y agoIt doesn’t do the runtime dispatch this person wants, but it eliminates the worry of running into an illegal instruction error. I think there are use cases for a fat binary, but I’m less certain as to its necessity.
- gameswithgo 8y agoit can, you generate all desired version of simd-ified function at compile time, then write a function to select the right one at runtime. that is what the Rust libs are doing, just using traits or macros instead of templates.