3 ms·
ISPC is just better, compared to bolting SIMD on C++ or Rust. Also, it supports dynamic dispatching, a feature that is painful to implement yourself.
by kookamamie 3y ago
ISPC is just better, compared to bolting SIMD on C++ or Rust. Also, it supports dynamic dispatching, a feature that is painful to implement yourself.
- anonymoushn 3y agoIs it easy to call into ISPC from C++ and rust for small subroutines like the ones in TFA?
- kookamamie 3y agoYes, extremely easy. ISPC emits objects and header files, which can be directly linked/included from C++. Dynamic dispatching happens automatically and the widest version of the called function gets selected according to the runtime architecture.
- janwas 3y agohm, any tool that enables people to write more SIMD is probably a good thing, but personally I find it preferable to have the SIMD integrated into the same toolchain. This allows us to (inlined!) call back into C++, use templates/classes in the SIMD code, and also inline together multiple SIMD code regions. I agree implementing dynamic dispatch is difficult, but Highway has taken care of that :)
- kookamamie 3y agoHighway is a step to the right direction, but more difficult to use compared to ISPC - e.g. handling remainders is mostly manual and somewhat error-prone.
- janwas 3y agoJust saw your comment. I agree that remainders are tricky. We do have some ready-made algorithms in hwy/contrib/algo and hwy/contrib/unroller which avoid remainder handling. Any thoughts on how this can be improved?