You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -295,6 +295,14 @@ The integer's value indicates the number of threads to use.
295
295
It is clamped to be between `1` and `min(Threads.nthreads(),LoopVectorization.num_cores())`.
296
296
`false` is equivalent to `1`, and `true` is equivalent to `min(Threads.nthreads(),LoopVectorization.num_cores())`.
297
297
298
+
`safe` (defaults to `true`) will cause `@turbo` to fall back to `@inbounds @fastmath` if `can_turbo` returns false for any of the functions called in the loop. You can disable the associated warning with `warn_check_args=false`.
299
+
300
+
Setting the keyword argument `warn_check_args=true` (e.g. `@turbo warn_check_args=true for ...`) in a loop or
301
+
broadcast statement will cause it to warn once if `LoopVectorization.check_args` fails and the fallback
302
+
loop is executed instead of the LoopVectorization-optimized loop.
303
+
Setting it to an integer > 0 will warn that many times, while setting it to a negative integer will warn
304
+
an unlimited amount of times. The default is `warn_check_args = 1`. Failure means that there may have been an array with unsupported type, unsupported element types, or (if `safe=true`) a function for which `can_turbo` returned `false`.
305
+
298
306
`inline` is a Boolean. When `true`, `body` will be directly inlined
299
307
into the function (via a forced-inlining call to `_turbo_!`).
300
308
When `false`, it wont force inlining of the call to `_turbo_!` instead, letting Julia's own inlining engine
@@ -324,12 +332,6 @@ and `@fastmath` is generated. Note that `VectorizationBase` provides functions s
324
332
ignore `@fastmath`, preserving IEEE semantics both within `@turbo` and `@fastmath`.
325
333
`check_args` currently returns false for some wrapper types like `LinearAlgebra.UpperTriangular`, requiring you to
326
334
use their `parent`. Triangular loops aren't yet supported.
327
-
328
-
Setting the keyword argument `warn_check_args=true` (e.g. `@turbo warn_check_args=true for ...`) in a loop or
329
-
broadcast statement will cause it to warn once if `LoopVectorization.check_args` fails and the fallback
330
-
loop is executed instead of the LoopVectorization-optimized loop.
331
-
Setting it to an integer > 0 will warn that many times, while setting it to a negative integer will warn
332
-
an unlimited amount of times. The default is `warn_check_args = 0`.
0 commit comments