Re: vectorization in icc (Nick Maclaren)
13 Dec 2002 00:09:37 -0500

          From comp.compilers

Related articles
[3 earlier articles]
Re: vectorization in icc kfredrik@saippua.cs.Helsinki.FI (Kimmo Fredriksson) (2002-12-07)
vectorization in icc (Bik, Aart) (2002-12-07)
Re: vectorization in icc (Terry Greyzck) (2002-12-11)
Re: vectorization in icc (2002-12-11)
Re: vectorization in icc (2002-12-11)
Re: vectorization in icc (2002-12-11)
Re: vectorization in icc (2002-12-13)
| List of all articles for this month |

From: (Nick Maclaren)
Newsgroups: comp.compilers
Date: 13 Dec 2002 00:09:37 -0500
Organization: University of Cambridge, England
References: 02-12-049 02-12-055
Keywords: parallel
Posted-Date: 13 Dec 2002 00:09:37 EST

"Terry Greyzck" <> writes:
|> For good vectorizable code:
|> - Use loops with a trip count that can be determined at compile or run time;
|> no while loops or linked lists.
|> - For C, use the 'restrict' qualifier where possible.
|> - If necessary, use the 'ivdep' pragma.
|> - Otherwise, write the loop like you would normally. Vectorizing compilers
|> have 25+ years of experience behind them and can handle most any
|> construct you can write.

You have missed out the very basic requirements!

  - Keep it simple
  - Keep it clean
  - Don't add warts

The last is really the one of ensuring that the loop can be written in
standard mathematical vector notation, with no nasty exits,
conditionals or unvectorisable operations (e.g. I/O). Whether ANY
conditional operations can be handled depends on the system.

But, of course, I am not denying any of your points :-) It is just
that most inexperienced users make a mistake with the simple
requirements and so your (slightly more advanced) ones are irrelevant.

Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Tel.: +44 1223 334761 Fax: +44 1223 334679

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.