mozilla/rust — pull request #5841 by sanxiyn (2013-04-11 16:01:11+00:00)
Title: SIMD for Rust

Fix #3499.

This is a work in progress.

`T ^ N` (temporary syntax) parses to `ast::ty_multi(@Ty, uint)` and converts to `ty::ty_multi(t, uint)` and lowers to LLVM SIMD vector type ``. Metadata support and reflection support are missing. There are minimal tests.

Casting scalar to vector broadcasts, and element-wise vector arithmetics is implemented. There should be a way to load from vectors to SIMD vector (since terminology is confusing, let's call this "multi"), which needs design.

Some TODOs are OpenCL-style swizzling, type conversion, more SIMD operations (such as saturated arithmetics), etc.