On 09/05/2012 03:09 PM, Iyer, Balaji V wrote:
> If we annotate *both* the function declaration and the function with the 
> following attribute, the compiler will create a vector and scalar version of 
> the function. 
> 
> __attribute__((vector)) my_func (int x, int y);
> 
> __attribute__((vector)) my_func (int x, int y) 
>     {
>       ... /* Body of the function.  */
>     }

I know Marc Glisse has already brought this up down-thread, but I'll
re-iterate for emphasis: You cannot possibly form a stable, exportable
ABI with this alone.

At minimum I would say that the vectorlength parameter would have to
be mandatory on declarations to be useful.  One could reasonably leave
them to default on definitions, or have explicit vectorlength(default)
for declarations internal to a project (i.e. assert that the file that
contains the elemental function is compiled with the same compile flags
and so will make the same choices for default).

I see that Intel does not even begin to address this within their own
documentation.  Is the problem of ABIs vs target cpus really being ignored?


r~

Reply via email to