x86-64 SIMD vector types and type-safe wrappers for SIMD intrinsics.
This library requires the simd
and layouts
compiler extensions.
Currently, 128-bit types (int8x16#
, int16x8#
, int32x4#
, int64x2#
, float32x4#
, float64x2#
)
and operations up to SSE4.2 are available.
To use SIMD in your program, add the library ocaml_simd_sse
and
the PPX ppx_simd
to your jbuild
.
-
ocaml_simd_sse
provides SSE types and operations. See the interface files under/sse
for details. -
ppx_simd
provides convenient type-checked syntax for specifying constants that modify the behavior of SIMD instructions. See/ppx
for details. -
Note that the
ocaml_simd
library only provides cross-instruction-set abstract types and constant definitions. You do not need to depend on this library directly. Instead, these constants may be generated byppx_simd
. See/src
for details. -
A sexp parser may be found in
ocaml_simd_sexp
. It uses SIMD instructions to achieve a performance improvement oversexplib
's parser. See/sexp
for details.
This set of libraries is intended for low-level use cases, and will form the basis for a higher-level array-processing library.