From bae3078a59ffa404371f2095885bcf06984efad2 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 14 Feb 2015 15:05:45 +0100 Subject: Support clang vector attribute --- vector.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vector.h') diff --git a/vector.h b/vector.h index 7633c15..6e65186 100644 --- a/vector.h +++ b/vector.h @@ -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 -- cgit v1.2.3