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_SCALAR_DEINTERLEAVE_H
21 #define VC_SCALAR_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::ScalarImpl>
32 {
33  template<typename V, typename M, typename A>
34  static Vc_ALWAYS_INLINE void deinterleave(V &a, V &b, const M *mem, A)
35  {
36  a = mem[0];
37  b = mem[1];
38  }
39 
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 *) {}
45 
46  template<Vc::MallocAlignment A>
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;
49 };
50 
51 } // namespace Scalar
52 } // namespace Vc
53 } // namespace ROOT
54 
55 #include "helperimpl.tcc"
56 #include "undomacros.h"
57 
58 #endif // VC_SCALAR_DEINTERLEAVE_H
TArc * a
Definition: textangle.C:12
static double A[]
Vc_ALWAYS_INLINE void free(T *p)
Frees memory that was allocated with Vc::malloc.
Definition: memory.h:94
static Vc_ALWAYS_INLINE void prefetchMid(const void *)
Definition: helperimpl.h:43
#define Vc_ALWAYS_INLINE_R
Definition: macros.h:132
static Vc_ALWAYS_INLINE void prefetchClose(const void *)
Definition: helperimpl.h:42
uses only fundamental types
Definition: global.h:379
#define Vc_ALWAYS_INLINE
Definition: macros.h:130
static Vc_ALWAYS_INLINE void deinterleave(V &a, V &b, const M *mem, A)
Definition: helperimpl.h:34
#define Vc_ALWAYS_INLINE_L
Definition: macros.h:131
static Vc_ALWAYS_INLINE void prefetchForOneRead(const void *)
Definition: helperimpl.h:40
static Vc_ALWAYS_INLINE void prefetchFar(const void *)
Definition: helperimpl.h:44
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
static Vc_ALWAYS_INLINE void prefetchForModify(const void *)
Definition: helperimpl.h:41
const Int_t n
Definition: legend1.C:16