Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Lampert <[email protected]>
  • Loading branch information
vchuravy and JoshuaLampert authored Aug 5, 2024
1 parent 055c81e commit dda0c67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ using Preferences: @load_preference, set_preferences!

const _PREFERENCE_SQRT = @load_preference("sqrt", "sqrt_Trixi_NaN")
const _PREFERENCE_LOG = @load_preference("log", "log_Trixi_NaN")
const _PREFERENCE_POLYESTER = parse(Bool, @load_preference("polyester", "true"))
const _PREFERENCE_POLYESTER = @load_preference("polyester", true)

# finite difference SBP operators
using SummationByPartsOperators: AbstractDerivativeOperator,
Expand Down
6 changes: 3 additions & 3 deletions src/auxiliary/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
const TRIXI_UUID = UUID("a7f1ee26-1774-49b1-8366-f1abc58fbfcb")

"""
Trixi.set_polyester(toggle::Bool; force = true)
Trixi.set_polyester!(toggle::Bool; force = true)
Toggle the usage of [Polyester.jl](https://github.com/JuliaSIMD/Polyester.jl) for multithreading.
By default, Polyester.jl is enabled, but it can
Expand All @@ -17,8 +17,8 @@ be useful for performance comparisons to switch to the Julia core backend.
This does not fully disable Polyester.jl,
buy only its use as part of Trixi.jl's `@threaded` macro.
"""
function set_polyester(toggle::Bool; force = true)
set_preferences!(TRIXI_UUID, "polyester" => string(toggle), force = force)
function set_polyester!(toggle::Bool; force = true)
set_preferences!(TRIXI_UUID, "polyester" => toggle, force = force)
@info "Please restart Julia and reload Trixi.jl for the `polyester` change to take effect"
end

Expand Down

0 comments on commit dda0c67

Please sign in to comment.