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) 2011-2012 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_AVX_HELPERIMPL_H
21 #define VC_AVX_HELPERIMPL_H
22 
23 #include "macros.h"
24 
25 namespace ROOT {
26 namespace Vc
27 {
28 namespace Internal
29 {
30 
31 template<> struct HelperImpl<Vc::AVXImpl>
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, typename MemT> static void deinterleave(sfloat_v &, sfloat_v &, const MemT *, A);
46 
47  template<typename A> static void deinterleave(double_v &, double_v &, const double *, A);
48 
49  template<typename A> static void deinterleave(int_v &, int_v &, const int *, A);
50  template<typename A> static void deinterleave(int_v &, int_v &, const short *, A);
51 
52  template<typename A> static void deinterleave(uint_v &, uint_v &, const unsigned int *, A);
53  template<typename A> static void deinterleave(uint_v &, uint_v &, const unsigned short *, A);
54 
55  template<typename A> static void deinterleave(short_v &, short_v &, const short *, A);
56 
57  template<typename A> static void deinterleave(ushort_v &, ushort_v &, const unsigned short *, A);
58 
59  template<typename V, typename M, typename A>
61  V &VC_RESTRICT c, const M *VC_RESTRICT memory, A align) Vc_ALWAYS_INLINE_R;
62 
63  template<typename V, typename M, typename A>
65  V &VC_RESTRICT c, V &VC_RESTRICT d,
66  const M *VC_RESTRICT memory, A align) Vc_ALWAYS_INLINE_R;
67 
68  template<typename V, typename M, typename A>
70  V &VC_RESTRICT c, V &VC_RESTRICT d, V &VC_RESTRICT e,
71  const M *VC_RESTRICT memory, A align) Vc_ALWAYS_INLINE_R;
72 
73  template<typename V, typename M, typename A>
75  V &VC_RESTRICT c, V &VC_RESTRICT d, V &VC_RESTRICT e,
76  V &VC_RESTRICT f, const M *VC_RESTRICT memory, A align) Vc_ALWAYS_INLINE_R;
77 
78  template<typename V, typename M, typename A>
80  V &VC_RESTRICT c, V &VC_RESTRICT d, V &VC_RESTRICT e,
82  const M *VC_RESTRICT memory, A align) Vc_ALWAYS_INLINE_R;
83 
84  static Vc_ALWAYS_INLINE_L void prefetchForOneRead(const void *addr) Vc_ALWAYS_INLINE_R;
85  static Vc_ALWAYS_INLINE_L void prefetchForModify(const void *addr) Vc_ALWAYS_INLINE_R;
86  static Vc_ALWAYS_INLINE_L void prefetchClose(const void *addr) Vc_ALWAYS_INLINE_R;
87  static Vc_ALWAYS_INLINE_L void prefetchMid(const void *addr) Vc_ALWAYS_INLINE_R;
88  static Vc_ALWAYS_INLINE_L void prefetchFar(const void *addr) Vc_ALWAYS_INLINE_R;
89 
90  template<Vc::MallocAlignment A>
91  static Vc_ALWAYS_INLINE_L void *malloc(size_t n) Vc_ALWAYS_INLINE_R;
92  static Vc_ALWAYS_INLINE_L void free(void *p) Vc_ALWAYS_INLINE_R;
93 };
94 
95 } // namespace Internal
96 } // namespace Vc
97 } // namespace ROOT
98 
99 #include "deinterleave.tcc"
100 #include "prefetches.tcc"
101 #include "helperimpl.tcc"
102 #include "undomacros.h"
103 
104 #endif // VC_AVX_HELPERIMPL_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
return c
TH1 * h
Definition: legend2.C:5
TArc * a
Definition: textangle.C:12
static double A[]
TFile * f
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
int d
Definition: tornado.py:11
void align()
Definition: geodemo.C:1778
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
Vc_ALWAYS_INLINE void prefetchMid(const void *addr)
Prefetch the cacheline containing addr to L2 cache.
Definition: memory.h:612
Vc_ALWAYS_INLINE void prefetchFar(const void *addr)
Prefetch the cacheline containing addr to L3 cache.
Definition: memory.h:627
AVX::Vector< unsigned short > ushort_v
Definition: helperimpl.h:39
x86 AVX
Definition: global.h:391
AVX::Vector< unsigned int > uint_v
Definition: helperimpl.h:37
#define Vc_ALWAYS_INLINE_L
Definition: macros.h:131
#define VC_RESTRICT
Definition: macros.h:145
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