Example A.9.2c

Discuss the OpenMP 3.0 API Specifications with the OpenMP Arch. Review Board. (Read Only)

Example A.9.2c

Postby nathanweeks » Thu Oct 29, 2009 5:23 am

I suggest the following changes to Example A.9.2c on p. 172 to avoid
compiler warnings about double-precision/single-precision conversions:

change (line 11)
Code: Select all
c[i] = (a[i] + b[i]) / 2.0;

Code: Select all
c[i] = (a[i] + b[i]) / 2.0f;

change (line 14)
Code: Select all
z[i] = sqrt(c[i]);

Code: Select all
z[i] = sqrtf(c[i]);
Nathan Weeks
Iowa State University HPC Group
Posts: 41
Joined: Sun May 17, 2009 6:19 am
Location: Iowa State University

Re: Example A.9.2c

Postby mwolfe » Fri Nov 06, 2009 6:31 pm

Thanks Nathan, that's a good suggestion.
I'll forward this to the language committee.


Return to OpenMP 3.0 API Specifications

Who is online

Users browsing this forum: No registered users and 1 guest