Mono.Simd Namespace

Hardware accelerated SIMD-based primitives.

Remarks

Important: the Mono.Simd assembly is a work-in-progress API and has not been finalized. We are publishing the assembly and the documentation hoping to get input and feedback from the community.

The Mono.Simd namespace provides a number of classes that are hardware accelerated by mapping the classes and the actual operations to native SIMD instructions on a processor.

When the Mono runtime's SIMD optimization are active the operations on the structures defined in this namespace are mapped to hardware operations which can improve the performance of your graphics, multimedia or 3D operations significantly.

Code that uses the types defined in the Mono.Simd assembly will work even on systems that do not have hardware SIMD operations, systems where Mono has not added support for the native SIMD operations and even on the Microsoft.NET runtime as it currently does not have support for hardware accelerated SIMD operations.

You can control whether the runtime will map the operations to SIMD primitives by using the -O command line option and specifying -O=simd to enable or -O=-simd to disable.

The operations that are hardware accelerated are flagged with the Acceleration attribute on each individual method. The Mode property describes the minimum version of CPU functionality required to use the operation. Software can use this flag to determine if they want to use the operations implemented in software or not.

Casting operations are also cheap, converting from one data type to another have a very low cost. This is useful to move information back and forth from floating point values to integers.

Classes

TypeReason
AccelerationAttributeDocuments the minimal hardware requirements for an operation to be hardware accelerated .
AccelModeFlags to encode SIMD acceleration requirements.
ArrayExtensionsDocumentation for this section has not yet been entered.
ShuffleSelDetermines how values are propagaged on initialization.
SimdRuntimeMethods to probe for SIMD support.
Vector16bA vector with sixteen bytes.
Vector16sbA vector with sixteen signed bytes.
Vector2dA vector with two doubles.
Vector2lA vector with two longs.
Vector2ulA vector with two unsigned longs.
Vector4fA vector with four floating point values.
Vector4iA vector with four integers.
Vector4uiA vector with four unsigned integers.
Vector8sA vector with eight shorts.
Vector8usA vector with eight ushorts.
VectorOperationsExtension methods to Vector types.