opencl-book-samples icon indicating copy to clipboard operation
opencl-book-samples copied to clipboard

Errata: Wrong explenation of assignment operator behvior (ch.4, pg.132)

Open GoogleCodeExporter opened this issue 9 years ago • 1 comments

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:

GoogleCodeExporter avatar Mar 14 '15 09:03 GoogleCodeExporter

Original comment by [email protected] on 7 Aug 2011 at 1:11

GoogleCodeExporter avatar Mar 14 '15 09:03 GoogleCodeExporter