JuliaSIMD / JuliaSIMD/LoopVectorization.jl
Turbo precondition checks
- Lingua principale
- Julia
- Stelle
- 789
- Fork
- 73
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
The readme warns
> We expect that any time you use the `@turbo` macro with a given block of code that you:
>
> Are not indexing an array out of bounds. `@turbo` does not perform any bounds checking.
> Are not iterating over an empty collection. Iterating over an empty loop such as for i ∈ eachindex(Float64[]) is undefined behavior, and will likely result in the out of bounds memory accesses. Ensure that loops behave correctly.
> Are not relying on a specific execution order. `@turbo` can and will re-order operations and loops inside its scope, so the correctness cannot depend on a particular order. You cannot implement cumsum with `@turbo`.
> Are not using multiple loops at the same level in nested loops.
The docs also warn
> Broadcasting an Array A when size(A,1) == 1 is NOT SUPPORTED, unless this is known at compile time (e.g., broadcasting a transposed vector is fine).
I assume turbo can't check these preconditions at runtime for performance reasons. During testing and debugging, I want to check the preconditions. Is it possible to enable these checks in a certain mode?
I count five checks. Are some of them more costly than others?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.