Begin forwarded message:
> From: Jens Nockert <j...@nockert.se>
> Subject: Re: [rust-dev] OpenCL-style accessors, casts.
> Date: 16 July 2013 14:36:34 CEST
> To: Brendan Zabarauskas <bjz...@yahoo.com.au>
>
>
> On 16 Jul 2013, at 14:07, Brendan Zabarauskas <bjz...@yahoo.com.au> wrote:
>
>> I'm not saying that the shuffles would have to be generated using the field
>> names - that would be near impossible.
>>
>> For example:
>>
>> ~~~
>> #[simd] struct RGB <T> { r: T, g: T, b: T, a: T }
>> ~~~
>>
>> Shuffling would still use the CL syntax:
>>
>> ~~~
>> let v2 = v.s3201
>> ~~~
>
>
> But then they would not behave like structs at all anymore, and you would see
> someone do something silly like define Vertex { w:f32, x:f32, y:f32, z:f32 }
> and try to access .w and get the value for z.
>
> And it only solves a small part of the problem, what is the type of a
> componentwise (v1 == v2), where v1, v2 are RGB<f32> ?
Ps. Sorry bjz that you get duplicate messages, it was early and I replied only
to you.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev