]>
Commit | Line | Data |
---|---|---|
f22341db | 1 | /* This file is part of the Vc library. |
2 | ||
3 | Copyright (C) 2010-2011 Matthias Kretz <kretz@kde.org> | |
4 | ||
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. | |
9 | ||
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. | |
14 | ||
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/>. | |
17 | ||
18 | */ | |
19 | ||
20 | #ifndef VC_SCALAR_DEINTERLEAVE_H | |
21 | #define VC_SCALAR_DEINTERLEAVE_H | |
22 | ||
23 | #include "macros.h" | |
24 | ||
c017a39f | 25 | namespace AliRoot { |
f22341db | 26 | namespace Vc |
27 | { | |
28 | namespace Internal | |
29 | { | |
30 | ||
31 | template<> struct HelperImpl<Vc::ScalarImpl> | |
32 | { | |
33 | template<typename V, typename M, typename A> | |
c017a39f | 34 | static Vc_ALWAYS_INLINE void deinterleave(V &a, V &b, const M *mem, A) |
f22341db | 35 | { |
36 | a = mem[0]; | |
37 | b = mem[1]; | |
38 | } | |
39 | ||
c017a39f | 40 | static Vc_ALWAYS_INLINE void prefetchForOneRead(const void *) {} |
41 | static Vc_ALWAYS_INLINE void prefetchForModify(const void *) {} | |
42 | static Vc_ALWAYS_INLINE void prefetchClose(const void *) {} | |
43 | static Vc_ALWAYS_INLINE void prefetchMid(const void *) {} | |
44 | static Vc_ALWAYS_INLINE void prefetchFar(const void *) {} | |
f22341db | 45 | |
46 | template<Vc::MallocAlignment A> | |
c017a39f | 47 | static Vc_ALWAYS_INLINE_L void *malloc(size_t n) Vc_ALWAYS_INLINE_R; |
48 | static Vc_ALWAYS_INLINE_L void free(void *p) Vc_ALWAYS_INLINE_R; | |
f22341db | 49 | }; |
50 | ||
51 | } // namespace Scalar | |
52 | } // namespace Vc | |
c017a39f | 53 | } // namespace AliRoot |
f22341db | 54 | |
55 | #include "helperimpl.tcc" | |
56 | #include "undomacros.h" | |
57 | ||
58 | #endif // VC_SCALAR_DEINTERLEAVE_H |