Example A.9.2c

Discuss the OpenMP 3.0 API Specifications with the OpenMP Arch. Review Board. (Read Only)
Forum rules
The OpenMP Forums are now closed to new posts. Please visit Stack Overflow if you are in need of help: https://stackoverflow.com/questions/tagged/openmp
Locked
nathanweeks
Posts: 41
Joined: Sun May 17, 2009 6:19 am
Location: Iowa State University
Contact:

Example A.9.2c

Post by nathanweeks »

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;
to

Code: Select all

c[i] = (a[i] + b[i]) / 2.0f;
change (line 14)

Code: Select all

z[i] = sqrt(c[i]);
to

Code: Select all

z[i] = sqrtf(c[i]);
--
Nathan Weeks
Iowa State University HPC Group
http://weeks.public.iastate.edu/

mwolfe

Re: Example A.9.2c

Post by mwolfe »

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

-mw

Locked