PDA

View Full Version : Why does OpenCL define 'bool' but does not define '_Bool'?



tanakamura
07-07-2009, 01:52 AM
Hi,

Standard C99 defines '_Bool' type.
But '_Bool' is not listed on 'Table 6.1' of opencl-1.0.43.pdf.
Instead, 'bool' type is listed on Table 6.1.
According to description of 'bool' at Table6.1,
behavior of standard C99's '_Bool' and OpenCL's 'bool' are same.

Why does OpenCL define the 'bool' type?

awoodland
09-17-2009, 07:27 AM
I'm guessing here that the rationale was that without the legacy code to worry about that C99 had they might as well give it the sensible name that would have been used if C had bool from the start.