Software Archive
Read-only legacy content
17061 Discussions

<#pragma simd assert> missing from spec?

Aldy_Hernandez
Beginner
692 Views

Hi.

The current GCC implementation of Cilk Plus includes assert/noassert clauses for #pragma simd.  I don't see this documented anywhere on the spec.

Has this been dropped from the spec (and thus should be removed from the implementation), or is the documentation missing?

Thanks.
Aldy 

0 Kudos
4 Replies
TimP
Honored Contributor III
692 Views

A presentation I saw this week appeared to imply the intention of expanding on __builtin_expect as the facility for assertions for optimization.

I see that the question was about the non-self-explanatory use of assert to raise failure for certain conditions of lack of optimization,

I wish this stuff were easy enough that simd would not silently generate totally wrong code on some targets while working perfectly on others.

0 Kudos
Balaji_I_Intel
Employee
692 Views

Hi Aldy,

    Assert/noassert clauses were part of the old spec. (version 0.9) and when we started the implementation it was the current spec. It is deprecated in the new one. Since it was already implemented, we chose to keep it.

Thanks,

 

Balaji V. Iyer.

0 Kudos
Aldy_Hernandez
Beginner
692 Views

Will there be a corresponding "vectorize or die" type of construct in the upcoming spec?  Because if not, then we should rip all the simd assert code from GCC (unless there is interest in keeping it in the non cilk+ GCC community).

0 Kudos
Pablo_H_Intel
Employee
692 Views

I don't think there will be a "vectorize or die" construct in an upcomming spec simply becuase "vectorize" is not a clearly-defined linguistic concept -- something is vectoirzed if it uses the vector instructions of the specific architecture.  That doesn't mean that there won't be a "vectorize or die" pragma in icc, but such a pragma would not be part of the (architecture-independent) Cilk Plus specification.  Whether or not gcc (or any compiler) has a "vectorize or die" is up to the community that produces that compiler, not up to the Cilk Plus specification.

0 Kudos
Reply