Re: VECTOR data types and intrinsic functions



Joost wrote:

(snip)

And this really is an issue. Vector hardware has been around
for years, and compilers have been able to generate code for it
from standard f77 onwards.

yes, but compilers tend to fail to recognize some of the
opportunities, or can not make the right decision unless more
information than explicit in the source is provided. Notice also that
this proposal is for very small vectors (i.e. the size of the SSE
registers for example) which is not what has been traditionally called
vectorizable code. The reason I would favor such a tool is that I've
been working hard on vectorizing a computational kernel in our code,
and this proposal would have solved the problems I had very elegantly.
Very similar data types are available in C.

But if it can be done using standard code, or slight modifications
to that code, that would seem better than doing something completely
different.

yes, but vectors for vector instructions must have 'special'
properties such as alignment and size that you might want to assert
using a special type.

Maybe a new KIND that would indicate the alignment and
vector length multiple that was needed. That would allow only a small
modification to most programs. I would also be a relatively small
modification to the compilers, other than the actual generation of
the vector instructions. (That is, most already have provisions for
handling alignment.)

Again, a preprocessor could convert the VECTOR style to a more
standard style for back compatibility.

(snip)

-- glen

.



Relevant Pages

  • Re: need help..
    ... snip ... ... > I don't like this habit for various reasons: ... > to read unless you are already quite used to reversing the test. ... > for a fact only that gcc and HP's compilers do this (and not because the ...
    (comp.lang.c)
  • Re: Why do you like C more than other programming languages?
    ... non-portability into their code by using C99 features. ... implementors can't even be bothered to implement C90 properly... ... If C99 compilers were readily available (and implemented at least ...
    (comp.lang.c)
  • Re: ARM7, DSP and mobile phone, how and why?
    ... > is portable across many compilers and architectures with little effort. ... magnitude machines. ... rely on the results of signed shift. ...
    (comp.lang.c)
  • Re: (FAQ details:) malloc(), void * and casts
    ... snip ... ... disturbingly common, is also surprisingly difficult to get right. ... have C++ compilers, but the reverse is not true, or at least very ... that C++ is not a true superset of C; ...
    (comp.lang.c)