ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
helperimpl.h
Go to the documentation of this file.
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_SSE_DEINTERLEAVE_H
21 #define VC_SSE_DEINTERLEAVE_H
22 
23 #include "macros.h"
24 
25 namespace ROOT {
26 namespace Vc
27 {
28 namespace Internal
29 {
30 
31 template<> struct HelperImpl<Vc::SSE2Impl>
32 {
40 
41  template<typename A> static void deinterleave(float_v &, float_v &, const float *, A);
42  template<typename A> static void deinterleave(float_v &, float_v &, const short *, A);
43  template<typename A> static void deinterleave(float_v &, float_v &, const unsigned short *, A);
44 
45  template<typename A> static void deinterleave(sfloat_v &, sfloat_v &, const float *, A);
46  template<typename A> static void deinterleave(sfloat_v &, sfloat_v &, const short *, A);
47  template<typename A> static void deinterleave(sfloat_v &, sfloat_v &, const unsigned short *, A);
48 
49  template<typename A> static void deinterleave(double_v &, double_v &, const double *, A);
50 
51  template<typename A> static void deinterleave(int_v &, int_v &, const int *, A);
52  template<typename A> static void deinterleave(int_v &, int_v &, const short *, A);
53 
54  template<typename A> static void deinterleave(uint_v &, uint_v &, const unsigned int *, A);
55  template<typename A> static void deinterleave(uint_v &, uint_v &, const unsigned short *, A);
56 
57  template<typename A> static void deinterleave(short_v &, short_v &, const short *, A);
58 
59  template<typename A> static void deinterleave(ushort_v &, ushort_v &, const unsigned short *, A);
60 
61  static Vc_ALWAYS_INLINE_L void prefetchForOneRead(const void *addr) Vc_ALWAYS_INLINE_R;
62  static Vc_ALWAYS_INLINE_L void prefetchForModify(const void *addr) Vc_ALWAYS_INLINE_R;
63  static Vc_ALWAYS_INLINE_L void prefetchClose(const void *addr) Vc_ALWAYS_INLINE_R;
64  static Vc_ALWAYS_INLINE_L void prefetchMid(const void *addr) Vc_ALWAYS_INLINE_R;
65  static Vc_ALWAYS_INLINE_L void prefetchFar(const void *addr) Vc_ALWAYS_INLINE_R;
66 
67  template<Vc::MallocAlignment A>
68  static Vc_ALWAYS_INLINE_L void *malloc(size_t n) Vc_ALWAYS_INLINE_R;
69  static Vc_ALWAYS_INLINE_L void free(void *p) Vc_ALWAYS_INLINE_R;
70 };
71 
72 template<> struct HelperImpl<SSE3Impl> : public HelperImpl<SSE2Impl> {};
73 template<> struct HelperImpl<SSSE3Impl> : public HelperImpl<SSE3Impl> {};
74 template<> struct HelperImpl<SSE41Impl> : public HelperImpl<SSSE3Impl> {};
75 template<> struct HelperImpl<SSE42Impl> : public HelperImpl<SSE41Impl> {};
76 
77 
78 } // namespace Internal
79 } // namespace Vc
80 } // namespace ROOT
81 
82 #include "deinterleave.tcc"
83 #include "prefetches.tcc"
84 #include "helperimpl.tcc"
85 #include "undomacros.h"
86 
87 #endif // VC_SSE_DEINTERLEAVE_H
Vc_ALWAYS_INLINE void deinterleave(V *a, V *b, const M *memory, A align)
Loads two vectors of values from an interleaved array.
Definition: deinterleave.h:69
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1 + SSE4.2
Definition: global.h:389
x86 SSE + SSE2
Definition: global.h:381
static double A[]
Vc_ALWAYS_INLINE void prefetchForModify(const void *addr)
Prefetch the cacheline containing addr for modification.
Definition: memory.h:582
Vc_ALWAYS_INLINE void free(T *p)
Frees memory that was allocated with Vc::malloc.
Definition: memory.h:94
x86 SSE + SSE2 + SSE3 + SSSE3 + SSE4.1
Definition: global.h:387
Vc_ALWAYS_INLINE void prefetchForOneRead(const void *addr)
Prefetch the cacheline containing addr for a single read access.
Definition: memory.h:565
Vc_ALWAYS_INLINE void prefetchClose(const void *addr)
Prefetch the cacheline containing addr to L1 cache.
Definition: memory.h:597
#define Vc_ALWAYS_INLINE_R
Definition: macros.h:132
SSE::Vector< unsigned int > uint_v
Definition: helperimpl.h:37
Vc_ALWAYS_INLINE void prefetchMid(const void *addr)
Prefetch the cacheline containing addr to L2 cache.
Definition: memory.h:612
x86 SSE + SSE2 + SSE3
Definition: global.h:383
SSE::Vector< unsigned short > ushort_v
Definition: helperimpl.h:39
Vc_ALWAYS_INLINE void prefetchFar(const void *addr)
Prefetch the cacheline containing addr to L3 cache.
Definition: memory.h:627
#define Vc_ALWAYS_INLINE_L
Definition: macros.h:131
x86 SSE + SSE2 + SSE3 + SSSE3
Definition: global.h:385
Vc_ALWAYS_INLINE_L T *Vc_ALWAYS_INLINE_R malloc(size_t n)
Allocates memory on the Heap with alignment and padding suitable for vectorized access.
Definition: memory.h:67
const Int_t n
Definition: legend1.C:16