Skip to contents

Select the backend used by subsequent calls to dispatched demo kernels such as count_nonzero() and convolve1d(). RsimdDispatch keeps all compiled variants in one shared object and switches a guarded resolved operation table. This makes same-process benchmarking possible.

Usage

simd_set_backend(backend = "auto")

Arguments

backend

Character scalar. Use "auto" to select the best available backend, or one of simd_info()$available_backends for an explicit choice.

Value

The selected backend summary string, invisibly. Possible values:

"<name>"

All operations resolved to the same named backend.

"mixed"

Different operations resolved to different backends (only possible under "auto").

"unavailable"

No operation could be resolved for the requested backend.

Examples

old <- simd_backend()
simd_set_backend("scalar")
simd_set_backend("auto")