-
Notifications
You must be signed in to change notification settings - Fork 36
Description
@andrewkern mentioned SLEEF in #578:
wrt further SIMDizing Eidos math functions-- transcendental functions aren't natively handled by SIMD instructions, but there is a quite portable library that most people use called
sleefthat we could consider bringing in: https://sleef.org/If you were open to that direction,
sleefcould be included as a git submodule and we could build it as a static library with all its bells and whistles turned off. Alternatively,sleefhas a way to build inline headers where we could include inline implementations really easily with a simple#include sleef.h
Aha, interesting. SLEEF looks quite remarkable and worth pursuing. I'm not sure which way of including it would be best. I would love the inline header option; but you have to build the inline header yourself, it is not provided. Do you know whether that has to be done on the target machine? I.e., does the generated header's code depends upon the target architecture/compiler? If so, that might make the benefits of that approach somewhat moot. I've never worked with git submodules, but I've heard a lot of people saying that it's painful (e.g., https://www.reddit.com/r/ExperiencedDevs/comments/1mttw8i/to_git_submodule_or_not_to/), and it would complicate the basic workflow of checking out and building SLiM, so I'm not crazy about that. But I'm not crazy about external link dependencies either. This is an interesting option: https://sleef.org/compile.xhtml#import but it would require a network connection to build, I guess (the first time, or every time?), and maybe we would not be able to control which version of SLEEF got imported and built against. So: a lot of options I'm not crazy about. If it is possible to build an inline header that is cross-platform and can just be included in SLiM's repo, that's clearly the best solution, to me, but I don't know if it's possible. The discussion of it here doesn't say: https://sleef.org/additional.xhtml#inline. It does note that SLEEF's "dispatcher" mechanism is not compatible with the inline header, which I think means that you'd have to have #ifdefs to select the correct version of a function to call, I think? Is that an acceptable sacrifice?