This set of libraries define native SIMD vector types and typed SIMD intrinsics. They currently support 128/256-bit numeric types and amd64 intrinsics up to AVX2.
To use SIMD in your program, add the library ocaml_simd_avx and
the PPX ppx_simd to your jbuild.
-
ocaml_simd_avxprovides AVX vector types and operations. See the interface files under/avxfor details. -
ppx_simdprovides convenient type-checked syntax for specifying constants that modify the behavior of SIMD instructions. See/ppxfor details. -
Note that the
ocaml_simdlibrary only provides cross-instruction-set abstract types and constant definitions. You do not need to depend on this library directly. Instead, these constants are generated byppx_simd. See/srcfor details. -
A sexp parser may be found in
ocaml_simd_sexp. It uses SIMD instructions to achieve a performance improvement oversexplib's parser. See/sexpfor details.
The current set of libraries are intended for low-level use cases, and will form the basis for a higher-level cross-platform library in the future.