Skip to content

Commit

Permalink
Merge pull request #30 from PALEOtoolkit/use_sleef_default_false
Browse files Browse the repository at this point in the history
Change SLEEF default to disabled
  • Loading branch information
sjdaines committed Jun 24, 2022
2 parents 372adc5 + 41a3897 commit 71f3d57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/SIMDutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ const FP32P8_d = NTuple{8,Core.VecElement{Float32}}
const FP32P4_d = NTuple{4,Core.VecElement{Float32}}

if !@Preferences.has_preference("USE_SLEEF")
@info "$(@__MODULE__) defining USE_SLEEF = true in LocalPreferences.toml"
@Preferences.set_preferences!("USE_SLEEF"=>true)
@info "$(@__MODULE__) defining USE_SLEEF = false in LocalPreferences.toml"
@Preferences.set_preferences!("USE_SLEEF"=>false)
end

const USE_SLEEF = @Preferences.load_preference("USE_SLEEF", false)
Expand Down Expand Up @@ -276,8 +276,8 @@ const USE_SLEEF = @Preferences.load_preference("USE_SLEEF", false)
sleeflog10(v::FP32P4_d) = ccall((:Sleef_log10f4_u10, SLEEF_jll.libsleef), FP32P4_d, (FP32P4_d,), v)
Base.log10(v::FP32P4) = SIMD.Vec(sleeflog10(v.data))
else
@info "$(@__MODULE__) No Sleef library, using defaults (probably slow scalar fallbacks) for SIMD log, exp, log10 functions"*
" - to enable Sleef, set USE_SLEEF = true in LocalPreferences.toml and restart your Julia session"
@info "$(@__MODULE__) Using defaults (probably slow scalar fallbacks) for SIMD log, exp, log10 functions"*
" - to enable Sleef library, set USE_SLEEF = true in LocalPreferences.toml and restart your Julia session"
end

end # module

0 comments on commit 71f3d57

Please sign in to comment.