1 /* This file is part of the Vc library.
3 Copyright (C) 2009-2010 Matthias Kretz <kretz@kde.org>
5 Vc is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation, either version 3 of
8 the License, or (at your option) any later version.
10 Vc is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with Vc. If not, see <http://www.gnu.org/licenses/>.
20 #include "../common/macros.h"
22 #ifndef VC_SSE_MACROS_H
23 #define VC_SSE_MACROS_H
24 #undef VC_SSE_UNDOMACROS_H
31 # define _M128I __m128i
35 # define _M128D __m128d
38 #define STORE_VECTOR(type, name, vec) \
39 union { __m128i p; type v[16 / sizeof(type)]; } CAT(u, __LINE__); \
40 _mm_store_si128(&CAT(u, __LINE__).p, vec); \
41 const type *const name = &CAT(u, __LINE__).v[0]
43 #if defined(VC_IMPL_SSE4_1) && !defined(VC_DISABLE_PTEST)
47 #endif // VC_SSE_MACROS_H