shibatch / sleef

SIMD Library for Evaluating Elementary Functions, vectorized libm and DFT
https://sleef.org
Boost Software License 1.0
628 stars 126 forks source link

Fix SLEEF_BUILD_SCALAR_LIB lost function #515

Closed xuhancn closed 5 months ago

xuhancn commented 6 months ago

Fix "SLEEF_BUILD_SCALAR_LIB" lost function to control build sleefscalar lib.

Status Control Build Control Install
Current Code No Yes
This PR Yes Yes

Original code: SLEEF_BUILD_SCALAR_LIB only control whether install scalar_lib, it would always build scalar_lib. My PR: SLEEF_BUILD_SCALAR_LIB control both whether build and install scalar_lib.

blapie commented 5 months ago

Hi! Could you please give a bit of context?

What do you mean by lost function? Do you mean that library is build but not installed?

I can see a benefit in choosing to build scalar libs or not, especially if they are not installed after all.

Just a quick reminder. In the original design, scalar routines are not meant to be used but rather here as a reference for vector implementations. So it is recommended not to use them when performance matters.

xuhancn commented 5 months ago

Hi! Could you please give a bit of context?

What do you mean by lost function? Do you mean that library is build but not installed?

I can see a benefit in choosing to build scalar libs or not, especially if they are not installed after all.

Just a quick reminder. In the original design, scalar routines are not meant to be used but rather here as a reference for vector implementations. So it is recommended not to use them when performance matters.

Q: What do you mean by lost function? Do you mean that library is build but not installed? A: I think SLEEF_BUILD_SCALAR_LIB should like other switch, both control build and install its library. lost function means lost control to build.

Original code: SLEEF_BUILD_SCALAR_LIB only control whether install scalar_lib, it would always build scalar_lib. My PR: SLEEF_BUILD_SCALAR_LIB control both whether build and install scalar_lib.

update to description also.