Gamaru / opencl-book-samples

Automatically exported from code.google.com/p/opencl-book-samples
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 wel...@gmail.com on 7 Aug 2011 at 12:06

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by dginsb...@upsamplesoftware.com on 7 Aug 2011 at 1:11