
On Mon, 2004-07-26 at 10:58, MR K P SCHUPKE wrote:
In the absence of such a standard, the best that can be done is to abstract vectorisation by word size and number of words, and supply a software implementation of all vector ops to use if the hardware does not support certain primitives.
Recent version of gcc provides a semi-portable vector extension. You define some vector data types and gcc will make use of whatever vector capability exists on the machine you are compiling for. Otherwise it uses narrower vector units if possible or just scaler units if that is all that is available. http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/Vector-Extensions.html Correct me if I'm wrong but I thought that there was some overhead to making FFI (even safe/unsafe) which would probably kill any advantage from using small vector units. In which case it'd need to be implemented as ghc primitive ops which is rather more work. Duncan