OpenMP Examples 4.0.2 : declare simd inbranch (SIMD7)

Discuss the OpenMP 4.0 Examples document.

OpenMP Examples 4.0.2 : declare simd inbranch (SIMD7)

Postby Spreis » Thu Jul 30, 2015 2:12 am

The comment for examples SIMD7 is inconsistent with the code of examples:

The comment at page 190 states:

1 In the code below, the function fib() is called in the main program and also recursively called in the
2 function fib() within an if condition. The compiler creates a masked vector version and a
3 non-masked vector version for the function fib() while retaining the original scalar version of the
4 fib() function.


However both C and Fortran code list 'inbranch' clause which explicitly prevents non-masked vector version according to p. 2.8.2. of OpenMP 4.0 spec.

Code: Select all
S-7 #pragma omp declare simd inbranch
S-8 int fib( int n )


and

Code: Select all
S-22 recursive function fib(n) result(r)
S-23 !$omp declare simd(fib) inbranch
Spreis
 
Posts: 12
Joined: Tue Jul 14, 2015 9:35 am

Return to OpenMP 4.0 Examples

Who is online

Users browsing this forum: No registered users and 1 guest

cron