Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use SLEEF trigonometric math #112

Open
Andarwinux opened this issue Jan 30, 2025 · 2 comments
Open

use SLEEF trigonometric math #112

Andarwinux opened this issue Jan 30, 2025 · 2 comments

Comments

@Andarwinux
Copy link

SLEEF can be used not only for FFT, but also for trigonometric functions, which is very useful for platforms such as MinGW where libm has very poor performance.

@cannam
Copy link
Member

cannam commented Jan 30, 2025

Interesting - the last time SLEEF was mentioned here (#90) it was to question whether we were wise to support it at all. But it looks to be more actively maintained now, which is nice.

I vaguely recall some practical difficulty matching the Sleef trigonometric function APIs to what we need, but I don't remember very clearly and things may have changed more recently anyway. I agree it sounds like a potentially good idea, I'll have to take another look.

@Andarwinux
Copy link
Author

Interesting - the last time SLEEF was mentioned here (#90) it was to question whether we were wise to support it at all. But it looks to be more actively maintained now, which is nice.

#90 is just a result of vcpkg itself using the wrong way to package SLEEF, and development on master remains active. I don't think there's anything wrong with SLEEF itself, and it's recently gotten some funding from Arm.

I vaguely recall some practical difficulty matching the Sleef trigonometric function APIs to what we need, but I don't remember very clearly and things may have changed more recently anyway. I agree it sounds like a potentially good idea, I'll have to take another look.

Thanks! MinGW's math functions are implemented using x87 inline asm, so this is a huge performance bottleneck, and clang/gcc's -fveclib doesn't support MinGW either, so I can only look for a more direct way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants