On Mon, 2 Dec 2013, Marc Glisse wrote:
>> Index: doc/extend.texi
>> ===================================================================
>> +In C++, the ternary operator @code{?:} is available. @code{a?b:c}, where
>> +@code{b} and @code{c} are vectors of the same type and @code{a} is an
>> +integer vector of the same size and number of elements as @code{b} and
>> +@code{c}
>> 
>> Why "same size and number of elements" in the above?  What is the
>> difference between these two?
> (on x86_64)
> A vector of 4 int and a vector of 4 long have the same number of elements but
> not the same size.
> A vector of 8 int and a vector of 4 long have the same size but not the same
> number of elements.
> 
> For semantics, we want the same number of elements. To match the 
> hardware, we want the same size.

Ah, so it was good I asked. :-)  Thanks for your explanation.

It seems the way this is intended is
  integer vector of the (same size and number of elements) as 
whereas I parsed it as
  (integer vector of the same size) and (number of elements) as
hence wondering what the difference between the size of the vector and 
the number of elements was.

Rephrasing this as "the same number and size of elements as" or better
"the same number of elements of the same size as" may help avoid this.

Gerald

Reply via email to