ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
writemaskedvector.h
Go to the documentation of this file.
1 /* This file is part of the Vc library.
2 
3  Copyright (C) 2009-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_WRITEMASKEDVECTOR_H
21 #define VC_AVX_WRITEMASKEDVECTOR_H
22 
23 #include "macros.h"
24 namespace ROOT {
25 namespace Vc
26 {
27 namespace AVX
28 {
29 
30 template<typename T>
32 {
33  friend class Vector<T>;
36  enum Constants { Size = sizeof(VectorType) / sizeof(EntryType) };
38  public:
40  //prefix
42  Vector<T> Vc_ALWAYS_INLINE_L &operator--() Vc_ALWAYS_INLINE_R;
43  //postfix
44  Vector<T> Vc_ALWAYS_INLINE_L operator++(int) Vc_ALWAYS_INLINE_R;
45  Vector<T> Vc_ALWAYS_INLINE_L operator--(int) Vc_ALWAYS_INLINE_R;
46 
47  Vector<T> Vc_ALWAYS_INLINE_L &operator+=(const Vector<T> &x) Vc_ALWAYS_INLINE_R;
48  Vector<T> Vc_ALWAYS_INLINE_L &operator-=(const Vector<T> &x) Vc_ALWAYS_INLINE_R;
49  Vector<T> Vc_ALWAYS_INLINE_L &operator*=(const Vector<T> &x) Vc_ALWAYS_INLINE_R;
50  Vector<T> Vc_ALWAYS_INLINE_L &operator/=(const Vector<T> &x) Vc_ALWAYS_INLINE_R;
51  Vector<T> Vc_ALWAYS_INLINE &operator+=(EntryType x) { return operator+=(Vector<T>(x)); }
55 
58 
59  template<typename F> Vc_INTRINSIC void call(const F &f) const {
60  return vec->call(f, mask);
61  }
62  template<typename F> Vc_INTRINSIC void call(F &f) const {
63  return vec->call(f, mask);
64  }
65  template<typename F> Vc_INTRINSIC Vector<T> apply(const F &f) const {
66  return vec->apply(f, mask);
67  }
68  template<typename F> Vc_INTRINSIC Vector<T> apply(F &f) const {
69  return vec->apply(f, mask);
70  }
71  private:
73  Vector<T> *const vec;
75 };
76 
77 } // namespace AVX
78 } // namespace Vc
79 } // namespace ROOT
80 #include "writemaskedvector.tcc"
81 #include "undomacros.h"
82 #endif // VC_AVX_WRITEMASKEDVECTOR_H
#define FREE_STORE_OPERATORS_ALIGNED(alignment)
Definition: macros.h:165
Vector< T > Vc_ALWAYS_INLINE & operator*=(EntryType x)
#define Vc_INTRINSIC
Definition: macros.h:139
TFile * f
TTree * T
Double_t x[n]
Definition: legend1.C:17
Vector< T > Vc_ALWAYS_INLINE & operator/=(EntryType x)
Vc_INTRINSIC void call(const F &f) const
Vc_ALWAYS_INLINE WriteMaskedVector(Vector< T > *v, const Mask &k)
Vector< T > Vc_ALWAYS_INLINE_L & operator=(const Vector< T > &x) Vc_ALWAYS_INLINE_R
#define AVX
Definition: global.h:90
#define Vc_ALWAYS_INLINE_R
Definition: macros.h:132
Vc_INTRINSIC void call(F &f) const
#define F(x, y, z)
Vector< T > Vc_ALWAYS_INLINE & operator=(EntryType x)
SVector< double, 2 > v
Definition: Dict.h:5
Vc_INTRINSIC Vector< T > apply(F &f) const
DetermineEntryType< T >::Type EntryType
#define Vc_ALWAYS_INLINE
Definition: macros.h:130
#define Vc_ALWAYS_INLINE_L
Definition: macros.h:131
Vector< T > Vc_ALWAYS_INLINE & operator-=(EntryType x)
VectorTypeHelper< T >::Type VectorType
Vc::AVX::Mask< Size, sizeof(VectorType)> Mask
Vector< T > Vc_ALWAYS_INLINE & operator+=(EntryType x)
Vc_INTRINSIC Vector< T > apply(const F &f) const