# SIMD Support¶

Type VecElement{T} is intended for building libraries of SIMD operations. Practical use of it requires using llvmcall. The type is defined as:

immutable VecElement{T}
value::T
end


It has a special compilation rule: a homogeneous tuple of VecElement{T} maps to an LLVM vector type when T is a bitstype and the tuple length is in the set {2-6,8-10,16}.

At -O3, the compiler might automatically vectorize operations on such tuples. For example, the following program, when compiled with julia -O3 generates two SIMD addition instructions (addps) on x86 systems:

typealias m128 NTuple{4,VecElement{Float32}}


However, since the automatic vectorization cannot be relied upon, future use will mostly be via libraries that use llvmcall.