sleef icon indicating copy to clipboard operation
sleef copied to clipboard

Installation, Configuration and Usage Under macOS

Open RoyiAvital opened this issue 6 years ago • 5 comments

Hello,

How could one generate Static Sleef Library under macOS? Could you update the documentation to show how it is done using xCode and GCC? Could you also add examples how could one set the compilation flags (For instant, Fast Math).

Thank You.

RoyiAvital avatar Apr 08 '18 15:04 RoyiAvital

You can do that with the standard procedure. In order to use gcc, type "CC=gcc-7 cmake -DBUILD_SHARED_LIBS=FALSE .." when you run cmake.

shibatch avatar Apr 09 '18 03:04 shibatch

What about enabling Fast Math? What about enabling higher optimization levels?

Do the static libraries built in Linux match macOS or vise versa?

Thank You.

RoyiAvital avatar Apr 09 '18 04:04 RoyiAvital

Optimization flags are automatically set by cmake. You cannot turn on fast-math since it will break the computation.

shibatch avatar Apr 09 '18 04:04 shibatch

Are the compilation flags the optimized for performance? What if one would want to reduce accuracy for speed, how could he do that?

Thank You.

RoyiAvital avatar Apr 09 '18 04:04 RoyiAvital

Computation in SLEEF is very delicate, and it is not easy to control the balance between speed and accuracy. Please use u35 versions if you prefer speed over accuracy.

shibatch avatar Apr 09 '18 04:04 shibatch