Re: Question about Vectors

2014-11-21 Thread Marco Leise via Digitalmars-d-learn
Am Thu, 20 Nov 2014 20:17:31 + schrieb Charles csmith.ku2...@gmail.com: So I was reading the documentation page: http://dlang.org/simd.html and noticed what appears to be a typo: int4 v; (cast(int*)v)[3] = 2; // set 3rd element of the 4 int vector (cast(int[4])v)[3] = 2; // set 3rd

Question about Vectors

2014-11-20 Thread Charles via Digitalmars-d-learn
So I was reading the documentation page: http://dlang.org/simd.html and noticed what appears to be a typo: int4 v; (cast(int*)v)[3] = 2; // set 3rd element of the 4 int vector (cast(int[4])v)[3] = 2; // set 3rd element of the 4 int vector v.array[3] = 2; // set 3rd element of the 4