Hacker News new | past | comments | ask | show | jobs | submit login

> well there is this: #ifdef _MSC_VER __declspec( align(16) ) struct float4 { float v[4]; }; #else struct float4 { float v[4]; } __attribute__ ((aligned(16))); #endif

I don't understand what you are trying to say here? Why not just use

    struct alignas(16) float4 { float v[4]; };
You can even put both __declspec( align(16) ) and __attribute__ ((aligned(16))) in the same place if you want to have a fallback for older compilers.



Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: