opencl-book-samples
opencl-book-samples copied to clipboard
Errata: Wrong explenation of assignment operator behvior (ch.4, pg.132)
The explenation for the behavior of the assignment operator is incorrect.
Please see attached file for clarification and focus.
In case the lvalue is a vector type, and the expression is a scalar type, then
the expression is widened and the assignment is done component-wise.
However, in case the lvalue is a scalar type, and the expression is a vector
type, this should result in a compilation error.
Also, if both the lvalue and the expression are of vector type, they must be of
the same width and the same base-type.
Original issue reported on code.google.com by [email protected]
on 7 Aug 2011 at 12:06
Attachments:
Original comment by [email protected]
on 7 Aug 2011 at 1:11