Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Sun, 08 Jan 2012 02:08:49 -0600 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: The container abstraction and parallel programming References: Date: Sun, 08 Jan 2012 08:08:49 +0000 Message-ID: <87ty46obu6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:3M04KpRGyXtIs+sNS2zyWnFKZqE= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 12 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-1J08MR60u04ATuiGfzaEPihiJlOQNiLj5mbX6jFdGqj3zq+swEwdH/RtKNQMXVXnqT+Elmj+5Ti9vPg!YP+LHeb+ABXAd3q2iaSvB5HNMNoupebz9tApI7vYts1sz72u6fmlUU5KCwp/mTLN2a8N4w== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1568 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c:15570 jacob navia writes: > Today, more than 10 years tafter Intel introduced the first SIMD > instructions it is still not possible to use those instructions to do > SIMD programming when you use C and two mainstream compilers like gcc > or MSVC. Nonsense. As well as the builtins already mentioned, GCC has -ftree-vectorize which uses these SIMD instructions automatically when the compiler can deduce that the aliasing rules allow it. Dot product and matrix multiplication get a sizeable speed up when you use it. The 'restrict' keyword helps a lot, also