[cfe-dev] vector constructors

Jochen Wilhelmy j.wilhelmy at arcor.de
Tue Mar 16 15:19:35 PDT 2010


> In my opinion, there is no reason to do this.  If you want C++ syntax to do this, define your_float4 as a struct with a constructor.  There is already too much needless diversity in vector initialization, and C++'0x may add a whole new world of pain here.
>   
Then I can keep my current implementation that does not use vectors and 
use an auto-vectorization
pass. By the way what is the current state of the art on this topic?

But maybe I add the function style constructor to my local copy since 
not having it raises other
questions like default-initialization:

struct Foo
{
    Foo() : x(), y() {}

    int x;
    int4 y;
};

If I get it working I will ask again ;-)

- Jochen




More information about the cfe-dev mailing list