Skip to content

Commit

Permalink
docs: tweak EvalOptions descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer authored Jul 28, 2024
1 parent e5adc4b commit 67bfab0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/Evaluate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,16 @@ This holds options for expression evaluation, such as evaluation backend.
# Fields
- `turbo::Val{T}`: If `Val{true}`, use LoopVectorization.jl for faster
- `turbo::Val{T}=Val(false)`: If `Val{true}`, use LoopVectorization.jl for faster
evaluation.
- `bumper::Val{B}`: If `Val{true}`, use Bumper.jl for faster evaluation.
- `early_exit::Val{E}`: If `Val{true}`, any element of any step becoming
`NaN` or `Inf` will terminate the computation and the whole buffer will be
returned with `NaN`s. This makes sure that expressions with singularities
don't wast compute cycles. Setting `Val{false}` will continue the computation
as usual and thus result in `NaN`s only in the elements that actually have
`NaN`s.
- `bumper::Val{B}=Val(false)`: If `Val{true}`, use Bumper.jl for faster evaluation.
- `early_exit::Val{E}=Val(true)`: If `Val{true}`, any element of any step becoming
`NaN` or `Inf` will terminate the computation. For `eval_tree_array`, this will
result in the second return value, the completion flag, being `false`. For
calling an expression using `tree(X)`, this will result in `NaN`s filling
the entire buffer. This early exit is performed to avoid wasting compute cycles.
Setting `Val{false}` will continue the computation as usual and thus result in
`NaN`s only in the elements that actually have `NaN`s.
"""
struct EvalOptions{T,B,E}
turbo::Val{T}
Expand Down

0 comments on commit 67bfab0

Please sign in to comment.