@hackage simd0.1.0.0

simple interface to GHC's SIMD instructions

SIMD (Single Instruction Multiple Data) CPU instructions provide a simple and fast way to parallelize numeric computations. GHC 7.8 provides primops that let us access these instructions. This package wraps thos primops in a more user friendly form.

The API is in two parts. First, it provides a thin wrapper around the primops in the same style as the Data.Primitive API. Second, it provides an interface for working with vectors in parallel. This interface consists of Unbox and Storable instances for the SIMD types, and efficient methods for converting between a SIMD Vector and a standard vector.

At the github repository, there is an example that uses criterion to measure the performance of calculating the l2 distance between vectors. There are many different versions of this function in the example. Each is written in different styles that demonstrate correct (and incorrect!) use of the library.