diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2015-02-14 15:05:45 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2015-05-02 21:36:45 +0200 |
commit | bae3078a59ffa404371f2095885bcf06984efad2 (patch) | |
tree | 8f4c0ebfc039c74efcf8f0ef67adb1ae05048e38 /vector.h | |
parent | f92a757aae2bd379a60b8b17c7fec673a917701a (diff) | |
download | pucket-bae3078a59ffa404371f2095885bcf06984efad2.tar.gz pucket-bae3078a59ffa404371f2095885bcf06984efad2.tar.bz2 pucket-bae3078a59ffa404371f2095885bcf06984efad2.zip |
Support clang vector attribute
Diffstat (limited to 'vector.h')
-rw-r--r-- | vector.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1,5 +1,14 @@ #pragma once +#if defined(__clang__) +#if __has_extension(attribute_ext_vector_type) +/* LLVM/clang */ +typedef double double2 __attribute__ ((ext_vector_type (2))); +typedef double double4 __attribute__ ((ext_vector_type (4))); +#endif +#else +/* GCC */ typedef double double2 __attribute__ ((vector_size (sizeof (double)*2))); typedef double double4 __attribute__ ((vector_size (sizeof (double)*4))); +#endif |