CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Functions | Variables
Matriplex Namespace Reference

Namespaces

 internal
 

Classes

struct  CholeskyInverter
 
struct  CholeskyInverter< T, 3, N >
 
struct  CholeskyInverterSym
 
struct  CholeskyInverterSym< T, 3, N >
 
struct  CramerInverter
 
struct  CramerInverter< T, 2, N >
 
struct  CramerInverter< T, 3, N >
 
struct  CramerInverterSym
 
struct  CramerInverterSym< T, 2, N >
 
struct  CramerInverterSym< T, 3, N >
 
class  MatriplexVector
 
struct  MultiplyCls
 
struct  MultiplyCls< T, 3, N >
 
struct  MultiplyCls< T, 6, N >
 
struct  SymMultiplyCls
 
struct  SymMultiplyCls< T, 3, N >
 
struct  SymMultiplyCls< T, 6, N >
 

Typedefs

typedef int idx_t
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
using MPlex = Matriplex< T, D1, D2, N >
 
template<typename T , idx_t D, idx_t N>
using MPlexSym = MatriplexSym< T, D, N >
 
template<class MP >
using MPlexVec = MatriplexVector< MP >
 

Functions

template<typename T , idx_t D, idx_t N>
class __attribute__ ((aligned(32))) MatriplexSym
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
class __attribute__ ((aligned(32))) Matriplex
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Nabs (const MPlex< T, D1, D2, N > &a)
 
void align_check (const char *pref, void *adr)
 
void * aligned_alloc64 (std::size_t size)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Natan2 (const MPlex< T, D1, D2, N > &y, const MPlex< T, D1, D2, N > &x)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Ncos (const MPlex< T, D1, D2, N > &a)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Nhypot (const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D, idx_t N>
void invertCholesky (MPlexVec< MPlex< T, D, D, N >> &A, int n_to_process=0)
 
template<typename T , idx_t D, idx_t N>
void invertCholesky (MPlex< T, D, D, N > &A)
 
template<typename T , idx_t D, idx_t N>
void invertCholeskySym (MPlexVec< MPlexSym< T, D, N >> &A, int n_to_process=0)
 
template<typename T , idx_t D, idx_t N>
void invertCholeskySym (MPlexSym< T, D, N > &A)
 
template<typename T , idx_t D, idx_t N>
void invertCramer (MPlexVec< MPlex< T, D, D, N >> &A, int n_to_process=0)
 
template<typename T , idx_t D, idx_t N>
void invertCramer (MPlex< T, D, D, N > &A, double *determ=nullptr)
 
template<typename T , idx_t D, idx_t N>
void invertCramerSym (MPlexVec< MPlexSym< T, D, N >> &A, int n_to_process=0)
 
template<typename T , idx_t D, idx_t N>
void invertCramerSym (MPlexSym< T, D, N > &A, double *determ=nullptr)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Nmax (const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Nmin (const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
void min_max (const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b, MPlex< T, D1, D2, N > &min, MPlex< T, D1, D2, N > &max)
 
template<typename T , idx_t D1, idx_t D2, idx_t D3, idx_t N>
void multiply (const MPlexVec< MPlex< T, D1, D2, N >> &A, const MPlexVec< MPlex< T, D2, D3, N >> &B, MPlexVec< MPlex< T, D1, D3, N >> &C, int n_to_process=0)
 
template<typename T , idx_t D, idx_t N>
void multiply (const MPlexVec< MPlexSym< T, D, N >> &A, const MPlexVec< MPlexSym< T, D, N >> &B, MPlexVec< MPlex< T, D, D, N >> &C, int n_to_process=0)
 
template<typename T , idx_t D, idx_t N>
void multiply (const MPlexSym< T, D, N > &A, const MPlexSym< T, D, N > &B, MPlex< T, D, D, N > &C)
 
template<typename T , idx_t D, idx_t N>
void multiply (const MPlex< T, D, D, N > &A, const MPlex< T, D, D, N > &B, MPlex< T, D, D, N > &C)
 
template<typename T , idx_t D1, idx_t D2, idx_t D3, idx_t N>
void multiply3in (MPlexVec< MPlex< T, D1, D2, N >> &A, MPlexVec< MPlex< T, D2, D3, N >> &B, MPlexVec< MPlex< T, D1, D3, N >> &C, int n_to_process=0)
 
template<typename T , idx_t D1, idx_t D2, idx_t D3, idx_t N>
void multiplyGeneral (const MPlexVec< MPlex< T, D1, D2, N >> &A, const MPlexVec< MPlex< T, D2, D3, N >> &B, MPlexVec< MPlex< T, D1, D3, N >> &C, int n_to_process=0)
 
template<typename T , idx_t D1, idx_t D2, idx_t D3, idx_t N>
void multiplyGeneral (const MPlex< T, D1, D2, N > &A, const MPlex< T, D2, D3, N > &B, MPlex< T, D1, D3, N > &C)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Nnegate (const MPlex< T, D1, D2, N > &a)
 
template<typename T , typename TT , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Nnegate_if_ltz (const MPlex< T, D1, D2, N > &a, const MPlex< TT, D1, D2, N > &sign)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator* (const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator* (const MPlex< T, D1, D2, N > &a, T b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator* (T a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator+ (const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator+ (const MPlex< T, D1, D2, N > &a, T b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator+ (T a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator- (const MPlex< T, D1, D2, N > &a)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator- (const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator- (const MPlex< T, D1, D2, N > &a, T b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator- (T a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator/ (const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator/ (const MPlex< T, D1, D2, N > &a, T b)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Noperator/ (T a, const MPlex< T, D1, D2, N > &b)
 
constexpr std::size_t round_up_align64 (std::size_t size)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Nsin (const MPlex< T, D1, D2, N > &a)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
void sincos (const MPlex< T, D1, D2, N > &a, MPlex< T, D1, D2, N > &s, MPlex< T, D1, D2, N > &c)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
void sincos4 (const MPlex< T, D1, D2, N > &a, MPlex< T, D1, D2, N > &s, MPlex< T, D1, D2, N > &c)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Nsqr (const MPlex< T, D1, D2, N > &a)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Nsqrt (const MPlex< T, D1, D2, N > &a)
 
template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex< T, D1, D2, Ntan (const MPlex< T, D1, D2, N > &a)
 

Variables

const idx_t gSymOffsets [7][36]
 

Typedef Documentation

◆ idx_t

typedef int Matriplex::idx_t

Definition at line 98 of file MatriplexCommon.h.

◆ MPlex

template<typename T , idx_t D1, idx_t D2, idx_t N>
using Matriplex::MPlex = typedef Matriplex<T, D1, D2, N>

Definition at line 483 of file Matriplex.h.

◆ MPlexSym

template<typename T , idx_t D, idx_t N>
using Matriplex::MPlexSym = typedef MatriplexSym<T, D, N>

Definition at line 280 of file MatriplexSym.h.

◆ MPlexVec

template<class MP >
using Matriplex::MPlexVec = typedef MatriplexVector<MP>

Definition at line 48 of file MatriplexVector.h.

Function Documentation

◆ __attribute__() [1/2]

template<typename T , idx_t D, idx_t N>
class Matriplex::__attribute__ ( (aligned(32))  )

no. of matrix rows

no. of matrix columns

no of elements: lower triangle

size of the whole matriplex

Definition at line 26 of file MatriplexSym.h.

References a, PVValHelper::add(), ASSUME_ALIGNED, b, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), filterCSVwithJSON::copy, ztail::d, gSymOffsets, mps_fire::i, recoMuon::in, dqmiolumiharvest::j, isotrackApplyRegressor::k, visualization-live-secondInstance_cfg::m, N, create_idmaps::n, hgchebackDigitizer_cfi::noise, upgradeWorkflowComponents::offsets, operator=(), operator[](), AlCaHLTBitMon_ParallelJobs::p, alignCSCRings::s, isotrackNtupler::scale, TrackRefitter_38T_cff::src, electronEcalRecHitIsolationLcone_cfi::subtract, submitPVValidationJobs::t, createJobs::tmp, mitigatedMETSequence_cff::U, interactiveExample::ui, findQualityFiles::v, and geometryCSVtoXML::xx.

26  {
27  public:
28  typedef T value_type;
29 
31  static constexpr int kRows = D;
33  static constexpr int kCols = D;
35  static constexpr int kSize = (D + 1) * D / 2;
37  static constexpr int kTotSize = N * kSize;
38 
39  T fArray[kTotSize];
40 
41  MatriplexSym() {}
42  MatriplexSym(T v) { setVal(v); }
43 
44  idx_t plexSize() const { return N; }
45 
46  void setVal(T v) {
47  for (idx_t i = 0; i < kTotSize; ++i) {
48  fArray[i] = v;
49  }
50  }
51 
52  void add(const MatriplexSym& v) {
53  for (idx_t i = 0; i < kTotSize; ++i) {
54  fArray[i] += v.fArray[i];
55  }
56  }
57 
58  void scale(T scale) {
59  for (idx_t i = 0; i < kTotSize; ++i) {
60  fArray[i] *= scale;
61  }
62  }
63 
64  T operator[](idx_t xx) const { return fArray[xx]; }
65  T& operator[](idx_t xx) { return fArray[xx]; }
66 
67  const idx_t* offsets() const { return gSymOffsets[D]; }
68  idx_t off(idx_t i) const { return gSymOffsets[D][i]; }
69 
70  const T& constAt(idx_t n, idx_t i, idx_t j) const { return fArray[off(i * D + j) * N + n]; }
71 
72  T& At(idx_t n, idx_t i, idx_t j) { return fArray[off(i * D + j) * N + n]; }
73 
74  T& operator()(idx_t n, idx_t i, idx_t j) { return At(n, i, j); }
75  const T& operator()(idx_t n, idx_t i, idx_t j) const { return constAt(n, i, j); }
76 
77  MatriplexSym& operator=(const MatriplexSym& m) {
78  memcpy(fArray, m.fArray, sizeof(T) * kTotSize);
79  return *this;
80  }
81 
82  MatriplexSym(const MatriplexSym& m) = default;
83 
84  void copySlot(idx_t n, const MatriplexSym& m) {
85  for (idx_t i = n; i < kTotSize; i += N) {
86  fArray[i] = m.fArray[i];
87  }
88  }
89 
90  void copyIn(idx_t n, const T* arr) {
91  for (idx_t i = n; i < kTotSize; i += N) {
92  fArray[i] = *(arr++);
93  }
94  }
95 
96  void copyIn(idx_t n, const MatriplexSym& m, idx_t in) {
97  for (idx_t i = n; i < kTotSize; i += N, in += N) {
98  fArray[i] = m[in];
99  }
100  }
101 
102  void copy(idx_t n, idx_t in) {
103  for (idx_t i = n; i < kTotSize; i += N, in += N) {
104  fArray[i] = fArray[in];
105  }
106  }
107 
108 #if defined(AVX512_INTRINSICS)
109 
110  template <typename U>
111  void slurpIn(const T* arr, __m512i& vi, const U&, const int N_proc = N) {
112  //_mm512_prefetch_i32gather_ps(vi, arr, 1, _MM_HINT_T0);
113 
114  const __m512 src = {0};
115  const __mmask16 k = N_proc == N ? -1 : (1 << N_proc) - 1;
116 
117  for (int i = 0; i < kSize; ++i, ++arr) {
118  //_mm512_prefetch_i32gather_ps(vi, arr+2, 1, _MM_HINT_NTA);
119 
120  __m512 reg = _mm512_mask_i32gather_ps(src, k, vi, arr, sizeof(U));
121  _mm512_mask_store_ps(&fArray[i * N], k, reg);
122  }
123  }
124 
125  // Experimental methods, slurpIn() seems to be at least as fast.
126  // See comments in mkFit/MkFitter.cc MkFitter::addBestHit().
127 
128  void ChewIn(const char* arr, int off, int vi[N], const char* tmp, __m512i& ui) {
129  // This is a hack ... we know sizeof(Hit) = 64 = cache line = vector width.
130 
131  for (int i = 0; i < N; ++i) {
132  __m512 reg = _mm512_load_ps(arr + vi[i]);
133  _mm512_store_ps((void*)(tmp + 64 * i), reg);
134  }
135 
136  for (int i = 0; i < kSize; ++i) {
137  __m512 reg = _mm512_i32gather_ps(ui, tmp + off + i * sizeof(T), 1);
138  _mm512_store_ps(&fArray[i * N], reg);
139  }
140  }
141 
142  void Contaginate(const char* arr, int vi[N], const char* tmp) {
143  // This is a hack ... we know sizeof(Hit) = 64 = cache line = vector width.
144 
145  for (int i = 0; i < N; ++i) {
146  __m512 reg = _mm512_load_ps(arr + vi[i]);
147  _mm512_store_ps((void*)(tmp + 64 * i), reg);
148  }
149  }
150 
151  void Plexify(const char* tmp, __m512i& ui) {
152  for (int i = 0; i < kSize; ++i) {
153  __m512 reg = _mm512_i32gather_ps(ui, tmp + i * sizeof(T), 1);
154  _mm512_store_ps(&fArray[i * N], reg);
155  }
156  }
157 
158 #elif defined(AVX2_INTRINSICS)
159 
160  template <typename U>
161  void slurpIn(const T* arr, __m256i& vi, const U&, const int N_proc = N) {
162  const __m256 src = {0};
163 
164  __m256i k = _mm256_setr_epi32(0, 1, 2, 3, 4, 5, 6, 7);
165  __m256i k_sel = _mm256_set1_epi32(N_proc);
166  __m256i k_master = _mm256_cmpgt_epi32(k_sel, k);
167 
168  k = k_master;
169  for (int i = 0; i < kSize; ++i, ++arr) {
170  __m256 reg = _mm256_mask_i32gather_ps(src, arr, vi, (__m256)k, sizeof(U));
171  // Restore mask (docs say gather clears it but it doesn't seem to).
172  k = k_master;
173  _mm256_maskstore_ps(&fArray[i * N], k, reg);
174  }
175  }
176 
177 #else
178 
179  void slurpIn(const T* arr, int vi[N], const int N_proc = N) {
180  // Separate N_proc == N case (gains about 7% in fit test).
181  if (N_proc == N) {
182  for (int i = 0; i < kSize; ++i) {
183  for (int j = 0; j < N; ++j) {
184  fArray[i * N + j] = *(arr + i + vi[j]);
185  }
186  }
187  } else {
188  for (int i = 0; i < kSize; ++i) {
189  for (int j = 0; j < N_proc; ++j) {
190  fArray[i * N + j] = *(arr + i + vi[j]);
191  }
192  }
193  }
194  }
195 
196 #endif
197 
198  void copyOut(idx_t n, T* arr) const {
199  for (idx_t i = n; i < kTotSize; i += N) {
200  *(arr++) = fArray[i];
201  }
202  }
203 
204  void setDiagonal3x3(idx_t n, T d) {
205  T* p = fArray + n;
206 
207  p[0 * N] = d;
208  p[1 * N] = 0;
209  p[2 * N] = d;
210  p[3 * N] = 0;
211  p[4 * N] = 0;
212  p[5 * N] = d;
213  }
214 
215  MatriplexSym& subtract(const MatriplexSym& a, const MatriplexSym& b) {
216  // Does *this = a - b;
217 
218 #pragma omp simd
219  for (idx_t i = 0; i < kTotSize; ++i) {
220  fArray[i] = a.fArray[i] - b.fArray[i];
221  }
222 
223  return *this;
224  }
225 
226  // ==================================================================
227  // Operations specific to Kalman fit in 6 parameter space
228  // ==================================================================
229 
230  void addNoiseIntoUpperLeft3x3(T noise) {
231  T* p = fArray;
232  ASSUME_ALIGNED(p, 64);
233 
234 #pragma omp simd
235  for (idx_t n = 0; n < N; ++n) {
236  p[0 * N + n] += noise;
237  p[2 * N + n] += noise;
238  p[5 * N + n] += noise;
239  }
240  }
241 
242  void invertUpperLeft3x3() {
243  typedef T TT;
244 
245  T* a = fArray;
246  ASSUME_ALIGNED(a, 64);
247 
248 #pragma omp simd
249  for (idx_t n = 0; n < N; ++n) {
250  const TT c00 = a[2 * N + n] * a[5 * N + n] - a[4 * N + n] * a[4 * N + n];
251  const TT c01 = a[4 * N + n] * a[3 * N + n] - a[1 * N + n] * a[5 * N + n];
252  const TT c02 = a[1 * N + n] * a[4 * N + n] - a[2 * N + n] * a[3 * N + n];
253  const TT c11 = a[5 * N + n] * a[0 * N + n] - a[3 * N + n] * a[3 * N + n];
254  const TT c12 = a[3 * N + n] * a[1 * N + n] - a[4 * N + n] * a[0 * N + n];
255  const TT c22 = a[0 * N + n] * a[2 * N + n] - a[1 * N + n] * a[1 * N + n];
256 
257  // Force determinant calculation in double precision.
258  const double det = (double)a[0 * N + n] * c00 + (double)a[1 * N + n] * c01 + (double)a[3 * N + n] * c02;
259  const TT s = TT(1) / det;
260 
261  a[0 * N + n] = s * c00;
262  a[1 * N + n] = s * c01;
263  a[2 * N + n] = s * c11;
264  a[3 * N + n] = s * c02;
265  a[4 * N + n] = s * c12;
266  a[5 * N + n] = s * c22;
267  }
268  }
269 
270  Matriplex<T, 1, 1, N> ReduceFixedIJ(idx_t i, idx_t j) const {
271  Matriplex<T, 1, 1, N> t;
272  for (idx_t n = 0; n < N; ++n) {
273  t[n] = constAt(n, i, j);
274  }
275  return t;
276  }
277  };
Basic3DVector & operator=(const Basic3DVector &)=default
Assignment operator.
const idx_t gSymOffsets[7][36]
Definition: MatriplexSym.h:13
d
Definition: ztail.py:151
#define N
Definition: blowfish.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
double b
Definition: hdecay.h:120
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
double a
Definition: hdecay.h:121
T operator[](int i) const
tmp
align.sh
Definition: createJobs.py:716
long double T
#define ASSUME_ALIGNED(a, b)

◆ __attribute__() [2/2]

template<typename T , idx_t D1, idx_t D2, idx_t N>
class Matriplex::__attribute__ ( (aligned(32))  )

return no. of matrix rows

return no. of matrix columns

return no of elements: rows*columns

size of the whole matriplex

Definition at line 35 of file Matriplex.h.

References a, abs(), PVValHelper::add(), atan2(), b, DummyCfis::c, ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), filterCSVwithJSON::copy, cos(), mkfit::mini_propagators::fast_atan2(), mkfit::mini_propagators::fast_sincos(), mkfit::mini_propagators::fast_tan(), hypot(), mps_fire::i, recoMuon::in, dqmiolumiharvest::j, isotrackApplyRegressor::k, visualization-live-secondInstance_cfg::m, N, create_idmaps::n, negate(), negate_if_ltz(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), operator[](), alignCSCRings::s, isotrackNtupler::scale, Validation_hcalonly_cfi::sign, sin(), sincos(), Matriplex::internal::sincos4(), sincos4(), sqr(), sqrt(), TrackRefitter_38T_cff::src, submitPVValidationJobs::t, tan(), createJobs::tmp, mitigatedMETSequence_cff::U, interactiveExample::ui, findQualityFiles::v, x, and geometryCSVtoXML::xx.

35  {
36  public:
37  typedef T value_type;
38 
40  static constexpr int kRows = D1;
42  static constexpr int kCols = D2;
44  static constexpr int kSize = D1 * D2;
46  static constexpr int kTotSize = N * kSize;
47 
48  T fArray[kTotSize];
49 
50  Matriplex() {}
51  Matriplex(T v) { setVal(v); }
52 
53  idx_t plexSize() const { return N; }
54 
55  void setVal(T v) {
56  for (idx_t i = 0; i < kTotSize; ++i) {
57  fArray[i] = v;
58  }
59  }
60 
61  void add(const Matriplex& v) {
62  for (idx_t i = 0; i < kTotSize; ++i) {
63  fArray[i] += v.fArray[i];
64  }
65  }
66 
67  void scale(T scale) {
68  for (idx_t i = 0; i < kTotSize; ++i) {
69  fArray[i] *= scale;
70  }
71  }
72 
73  Matriplex& negate() {
74  for (idx_t i = 0; i < kTotSize; ++i) {
75  fArray[i] = -fArray[i];
76  }
77  return *this;
78  }
79 
80  template <typename TT>
81  Matriplex& negate_if_ltz(const Matriplex<TT, D1, D2, N>& sign) {
82  for (idx_t i = 0; i < kTotSize; ++i) {
83  if (sign.fArray[i] < 0)
84  fArray[i] = -fArray[i];
85  }
86  return *this;
87  }
88 
89  T operator[](idx_t xx) const { return fArray[xx]; }
90  T& operator[](idx_t xx) { return fArray[xx]; }
91 
92  const T& constAt(idx_t n, idx_t i, idx_t j) const { return fArray[(i * D2 + j) * N + n]; }
93 
94  T& At(idx_t n, idx_t i, idx_t j) { return fArray[(i * D2 + j) * N + n]; }
95 
96  T& operator()(idx_t n, idx_t i, idx_t j) { return fArray[(i * D2 + j) * N + n]; }
97  const T& operator()(idx_t n, idx_t i, idx_t j) const { return fArray[(i * D2 + j) * N + n]; }
98 
99  // reduction operators
100 
101  using QReduced = Matriplex<T, 1, 1, N>;
102 
103  QReduced ReduceFixedIJ(idx_t i, idx_t j) const {
104  QReduced t;
105  for (idx_t n = 0; n < N; ++n) {
106  t[n] = constAt(n, i, j);
107  }
108  return t;
109  }
110  QReduced rij(idx_t i, idx_t j) const { return ReduceFixedIJ(i, j); }
111  QReduced operator()(idx_t i, idx_t j) const { return ReduceFixedIJ(i, j); }
112 
113  struct QAssigner {
114  Matriplex& m_matriplex;
115  const int m_i, m_j;
116 
117  QAssigner(Matriplex& m, int i, int j) : m_matriplex(m), m_i(i), m_j(j) {}
118  Matriplex& operator=(const QReduced& qvec) {
119  for (idx_t n = 0; n < N; ++n) {
120  m_matriplex(n, m_i, m_j) = qvec[n];
121  }
122  return m_matriplex;
123  }
124  Matriplex& operator=(T qscalar) {
125  for (idx_t n = 0; n < N; ++n) {
126  m_matriplex(n, m_i, m_j) = qscalar;
127  }
128  return m_matriplex;
129  }
130  };
131 
132  QAssigner AssignFixedIJ(idx_t i, idx_t j) { return QAssigner(*this, i, j); }
133  QAssigner aij(idx_t i, idx_t j) { return AssignFixedIJ(i, j); }
134 
135  // assignment operators
136 
137  Matriplex& operator=(T t) {
138  for (idx_t i = 0; i < kTotSize; ++i)
139  fArray[i] = t;
140  return *this;
141  }
142 
143  Matriplex& operator+=(T t) {
144  for (idx_t i = 0; i < kTotSize; ++i)
145  fArray[i] += t;
146  return *this;
147  }
148 
149  Matriplex& operator-=(T t) {
150  for (idx_t i = 0; i < kTotSize; ++i)
151  fArray[i] -= t;
152  return *this;
153  }
154 
155  Matriplex& operator*=(T t) {
156  for (idx_t i = 0; i < kTotSize; ++i)
157  fArray[i] *= t;
158  return *this;
159  }
160 
161  Matriplex& operator/=(T t) {
162  for (idx_t i = 0; i < kTotSize; ++i)
163  fArray[i] /= t;
164  return *this;
165  }
166 
167  Matriplex& operator+=(const Matriplex& a) {
168  for (idx_t i = 0; i < kTotSize; ++i)
169  fArray[i] += a.fArray[i];
170  return *this;
171  }
172 
173  Matriplex& operator-=(const Matriplex& a) {
174  for (idx_t i = 0; i < kTotSize; ++i)
175  fArray[i] -= a.fArray[i];
176  return *this;
177  }
178 
179  Matriplex& operator*=(const Matriplex& a) {
180  for (idx_t i = 0; i < kTotSize; ++i)
181  fArray[i] *= a.fArray[i];
182  return *this;
183  }
184 
185  Matriplex& operator/=(const Matriplex& a) {
186  for (idx_t i = 0; i < kTotSize; ++i)
187  fArray[i] /= a.fArray[i];
188  return *this;
189  }
190 
191  Matriplex operator-() {
192  Matriplex t;
193  for (idx_t i = 0; i < kTotSize; ++i)
194  t.fArray[i] = -fArray[i];
195  return t;
196  }
197 
198  Matriplex& abs(const Matriplex& a) {
199  for (idx_t i = 0; i < kTotSize; ++i)
200  fArray[i] = std::abs(a.fArray[i]);
201  return *this;
202  }
203  Matriplex& abs() {
204  for (idx_t i = 0; i < kTotSize; ++i)
205  fArray[i] = std::abs(fArray[i]);
206  return *this;
207  }
208 
209  Matriplex& sqr(const Matriplex& a) {
210  for (idx_t i = 0; i < kTotSize; ++i)
211  fArray[i] = a.fArray[i] * a.fArray[i];
212  return *this;
213  }
214  Matriplex& sqr() {
215  for (idx_t i = 0; i < kTotSize; ++i)
216  fArray[i] = fArray[i] * fArray[i];
217  return *this;
218  }
219 
220  //---------------------------------------------------------
221  // transcendentals, std version
222 
223  Matriplex& sqrt(const Matriplex& a) {
224  for (idx_t i = 0; i < kTotSize; ++i)
225  fArray[i] = std::sqrt(a.fArray[i]);
226  return *this;
227  }
228  Matriplex& sqrt() {
229  for (idx_t i = 0; i < kTotSize; ++i)
230  fArray[i] = std::sqrt(fArray[i]);
231  return *this;
232  }
233 
234  Matriplex& hypot(const Matriplex& a, const Matriplex& b) {
235  for (idx_t i = 0; i < kTotSize; ++i) {
236  fArray[i] = a.fArray[i] * a.fArray[i] + b.fArray[i] * b.fArray[i];
237  }
238  return sqrt();
239  }
240 
241  Matriplex& sin(const Matriplex& a) {
242  for (idx_t i = 0; i < kTotSize; ++i)
243  fArray[i] = std::sin(a.fArray[i]);
244  return *this;
245  }
246  Matriplex& sin() {
247  for (idx_t i = 0; i < kTotSize; ++i)
248  fArray[i] = std::sin(fArray[i]);
249  return *this;
250  }
251 
252  Matriplex& cos(const Matriplex& a) {
253  for (idx_t i = 0; i < kTotSize; ++i)
254  fArray[i] = std::cos(a.fArray[i]);
255  return *this;
256  }
257  Matriplex& cos() {
258  for (idx_t i = 0; i < kTotSize; ++i)
259  fArray[i] = std::cos(fArray[i]);
260  return *this;
261  }
262 
263  Matriplex& tan(const Matriplex& a) {
264  for (idx_t i = 0; i < kTotSize; ++i)
265  fArray[i] = std::tan(a.fArray[i]);
266  return *this;
267  }
268  Matriplex& tan() {
269  for (idx_t i = 0; i < kTotSize; ++i)
270  fArray[i] = std::tan(fArray[i]);
271  return *this;
272  }
273 
274  Matriplex& atan2(const Matriplex& y, const Matriplex& x) {
275  for (idx_t i = 0; i < kTotSize; ++i)
276  fArray[i] = std::atan2(y.fArray[i], x.fArray[i]);
277  return *this;
278  }
279 
280  //---------------------------------------------------------
281  // transcendentals, vdt version
282 
283 #ifdef MPLEX_VDT
284 
285 #define ASS fArray[i] =
286 #define ARR fArray[i]
287 #define A_ARR a.fArray[i]
288 
289 #ifdef MPLEX_VDT_USE_STD
290 #define VDT_INVOKE(_ass_, _func_, ...) \
291  for (idx_t i = 0; i < kTotSize; ++i) \
292  _ass_ std::_func_(__VA_ARGS__);
293 #else
294 #define VDT_INVOKE(_ass_, _func_, ...) \
295  for (idx_t i = 0; i < kTotSize; ++i) \
296  if constexpr (std::is_same<T, float>()) \
297  _ass_ vdt::fast_##_func_##f(__VA_ARGS__); \
298  else \
299  _ass_ vdt::fast_##_func_(__VA_ARGS__);
300 #endif
301 
302  Matriplex& fast_isqrt(const Matriplex& a) {
303  VDT_INVOKE(ASS, isqrt, A_ARR);
304  return *this;
305  }
306  Matriplex& fast_isqrt() {
307  VDT_INVOKE(ASS, isqrt, ARR);
308  return *this;
309  }
310 
311  Matriplex& fast_sin(const Matriplex& a) {
312  VDT_INVOKE(ASS, sin, A_ARR);
313  return *this;
314  }
315  Matriplex& fast_sin() {
316  VDT_INVOKE(ASS, sin, ARR);
317  return *this;
318  }
319 
320  Matriplex& fast_cos(const Matriplex& a) {
321  VDT_INVOKE(ASS, cos, A_ARR);
322  return *this;
323  }
324  Matriplex& fast_cos() {
325  VDT_INVOKE(ASS, cos, ARR);
326  return *this;
327  }
328 
329  void fast_sincos(Matriplex& s, Matriplex& c) const { VDT_INVOKE(, sincos, ARR, s.fArray[i], c.fArray[i]); }
330 
331  Matriplex& fast_tan(const Matriplex& a) {
332  VDT_INVOKE(ASS, tan, A_ARR);
333  return *this;
334  }
335  Matriplex& fast_tan() {
336  VDT_INVOKE(ASS, tan, ARR);
337  return *this;
338  }
339 
340  Matriplex& fast_atan2(const Matriplex& y, const Matriplex& x) {
341  VDT_INVOKE(ASS, atan2, y.fArray[i], x.fArray[i]);
342  return *this;
343  }
344 
345 #undef VDT_INVOKE
346 
347 #undef ASS
348 #undef ARR
349 #undef A_ARR
350 #endif
351 
352  void sincos4(Matriplex& s, Matriplex& c) const {
353  for (idx_t i = 0; i < kTotSize; ++i)
354  internal::sincos4(fArray[i], s.fArray[i], c.fArray[i]);
355  }
356 
357  //---------------------------------------------------------
358 
359  void copySlot(idx_t n, const Matriplex& m) {
360  for (idx_t i = n; i < kTotSize; i += N) {
361  fArray[i] = m.fArray[i];
362  }
363  }
364 
365  void copyIn(idx_t n, const T* arr) {
366  for (idx_t i = n; i < kTotSize; i += N) {
367  fArray[i] = *(arr++);
368  }
369  }
370 
371  void copyIn(idx_t n, const Matriplex& m, idx_t in) {
372  for (idx_t i = n; i < kTotSize; i += N, in += N) {
373  fArray[i] = m[in];
374  }
375  }
376 
377  void copy(idx_t n, idx_t in) {
378  for (idx_t i = n; i < kTotSize; i += N, in += N) {
379  fArray[i] = fArray[in];
380  }
381  }
382 
383 #if defined(AVX512_INTRINSICS)
384 
385  template <typename U>
386  void slurpIn(const T* arr, __m512i& vi, const U&, const int N_proc = N) {
387  //_mm512_prefetch_i32gather_ps(vi, arr, 1, _MM_HINT_T0);
388 
389  const __m512 src = {0};
390  const __mmask16 k = N_proc == N ? -1 : (1 << N_proc) - 1;
391 
392  for (int i = 0; i < kSize; ++i, ++arr) {
393  //_mm512_prefetch_i32gather_ps(vi, arr+2, 1, _MM_HINT_NTA);
394 
395  __m512 reg = _mm512_mask_i32gather_ps(src, k, vi, arr, sizeof(U));
396  _mm512_mask_store_ps(&fArray[i * N], k, reg);
397  }
398  }
399 
400  // Experimental methods, slurpIn() seems to be at least as fast.
401  // See comments in mkFit/MkFitter.cc MkFitter::addBestHit().
402  void ChewIn(const char* arr, int off, int vi[N], const char* tmp, __m512i& ui) {
403  // This is a hack ... we know sizeof(Hit) = 64 = cache line = vector width.
404 
405  for (int i = 0; i < N; ++i) {
406  __m512 reg = _mm512_load_ps(arr + vi[i]);
407  _mm512_store_ps((void*)(tmp + 64 * i), reg);
408  }
409 
410  for (int i = 0; i < kSize; ++i) {
411  __m512 reg = _mm512_i32gather_ps(ui, tmp + off + i * sizeof(T), 1);
412  _mm512_store_ps(&fArray[i * N], reg);
413  }
414  }
415 
416  void Contaginate(const char* arr, int vi[N], const char* tmp) {
417  // This is a hack ... we know sizeof(Hit) = 64 = cache line = vector width.
418 
419  for (int i = 0; i < N; ++i) {
420  __m512 reg = _mm512_load_ps(arr + vi[i]);
421  _mm512_store_ps((void*)(tmp + 64 * i), reg);
422  }
423  }
424 
425  void Plexify(const char* tmp, __m512i& ui) {
426  for (int i = 0; i < kSize; ++i) {
427  __m512 reg = _mm512_i32gather_ps(ui, tmp + i * sizeof(T), 1);
428  _mm512_store_ps(&fArray[i * N], reg);
429  }
430  }
431 
432 #elif defined(AVX2_INTRINSICS)
433 
434  template <typename U>
435  void slurpIn(const T* arr, __m256i& vi, const U&, const int N_proc = N) {
436  // Casts to float* needed to "support" also T=HitOnTrack.
437  // Note that sizeof(float) == sizeof(HitOnTrack) == 4.
438 
439  const __m256 src = {0};
440 
441  __m256i k = _mm256_setr_epi32(0, 1, 2, 3, 4, 5, 6, 7);
442  __m256i k_sel = _mm256_set1_epi32(N_proc);
443  __m256i k_master = _mm256_cmpgt_epi32(k_sel, k);
444 
445  k = k_master;
446  for (int i = 0; i < kSize; ++i, ++arr) {
447  __m256 reg = _mm256_mask_i32gather_ps(src, (float*)arr, vi, (__m256)k, sizeof(U));
448  // Restore mask (docs say gather clears it but it doesn't seem to).
449  k = k_master;
450  _mm256_maskstore_ps((float*)&fArray[i * N], k, reg);
451  }
452  }
453 
454 #else
455 
456  void slurpIn(const T* arr, int vi[N], const int N_proc = N) {
457  // Separate N_proc == N case (gains about 7% in fit test).
458  if (N_proc == N) {
459  for (int i = 0; i < kSize; ++i) {
460  for (int j = 0; j < N; ++j) {
461  fArray[i * N + j] = *(arr + i + vi[j]);
462  }
463  }
464  } else {
465  for (int i = 0; i < kSize; ++i) {
466  for (int j = 0; j < N_proc; ++j) {
467  fArray[i * N + j] = *(arr + i + vi[j]);
468  }
469  }
470  }
471  }
472 
473 #endif
474 
475  void copyOut(idx_t n, T* arr) const {
476  for (idx_t i = n; i < kTotSize; i += N) {
477  *(arr++) = fArray[i];
478  }
479  }
480  };
Basic3DVector & operator*=(T t)
Scaling by a scalar value (multiplication)
void sincos4(const MPlex< T, D1, D2, N > &a, MPlex< T, D1, D2, N > &s, MPlex< T, D1, D2, N > &c)
Definition: Matriplex.h:696
Divides< B, C > D2
Definition: Factorize.h:137
Basic3DVector & operator=(const Basic3DVector &)=default
Assignment operator.
MPlex< T, D1, D2, N > negate(const MPlex< T, D1, D2, N > &a)
Definition: Matriplex.h:497
MPlex< T, D1, D2, N > hypot(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:616
MPlex< T, D1, D2, N > sin(const MPlex< T, D1, D2, N > &a)
Definition: Matriplex.h:622
Basic3DVector & operator-=(const Basic3DVector< U > &p)
MPlex< T, D1, D2, N > sqr(const MPlex< T, D1, D2, N > &a)
Definition: Matriplex.h:601
void sincos(const MPlex< T, D1, D2, N > &a, MPlex< T, D1, D2, N > &s, MPlex< T, D1, D2, N > &c)
Definition: Matriplex.h:634
Divides< A, C > D1
Definition: Factorize.h:136
MPF fast_tan(const MPF &a)
MPlex< T, D1, D2, N > abs(const MPlex< T, D1, D2, N > &a)
Definition: Matriplex.h:595
MPlex< T, D1, D2, N > negate_if_ltz(const MPlex< T, D1, D2, N > &a, const MPlex< TT, D1, D2, N > &sign)
Definition: Matriplex.h:504
MPlex< T, D1, D2, N > operator-(T a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:574
#define N
Definition: blowfish.cc:9
Basic3DVector & operator/=(T t)
Scaling by a scalar value (division)
MPlex< T, D1, D2, N > tan(const MPlex< T, D1, D2, N > &a)
Definition: Matriplex.h:642
double b
Definition: hdecay.h:120
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
double a
Definition: hdecay.h:121
float x
MPF fast_atan2(const MPF &y, const MPF &x)
void fast_sincos(const MPF &a, MPF &s, MPF &c)
T operator[](int i) const
tmp
align.sh
Definition: createJobs.py:716
long double T
Basic3DVector & operator+=(const Basic3DVector< U > &p)
MPlex< T, D1, D2, N > cos(const MPlex< T, D1, D2, N > &a)
Definition: Matriplex.h:628
MPlex< T, D1, D2, N > sqrt(const MPlex< T, D1, D2, N > &a)
Definition: Matriplex.h:610
MPlex< T, D1, D2, N > atan2(const MPlex< T, D1, D2, N > &y, const MPlex< T, D1, D2, N > &x)
Definition: Matriplex.h:648

◆ abs()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::abs ( const MPlex< T, D1, D2, N > &  a)

Definition at line 595 of file Matriplex.h.

References a, and submitPVValidationJobs::t.

Referenced by __attribute__().

595  {
596  MPlex<T, D1, D2, N> t;
597  return t.abs(a);
598  }
double a
Definition: hdecay.h:121

◆ align_check()

void Matriplex::align_check ( const char *  pref,
void *  adr 
)

Definition at line 4 of file MatriplexCommon.cc.

Referenced by mkfit::MkFitter::checkAlignment().

4  {
5  printf("%s 0x%llx - modulo 64 = %lld\n", pref, (long long unsigned)adr, (long long)adr % 64);
6  }

◆ aligned_alloc64()

void* Matriplex::aligned_alloc64 ( std::size_t  size)
inline

Definition at line 13 of file Memory.h.

References aligned_alloc(), and round_up_align64().

Referenced by mkfit::Pool< mkfit::MkFitter >::create(), and Matriplex::MatriplexVector< MP >::MatriplexVector().

size
Write out results.
void * aligned_alloc(size_t alignment, size_t size) noexcept
constexpr std::size_t round_up_align64(std::size_t size)
Definition: Memory.h:8

◆ atan2()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::atan2 ( const MPlex< T, D1, D2, N > &  y,
const MPlex< T, D1, D2, N > &  x 
)

Definition at line 648 of file Matriplex.h.

References submitPVValidationJobs::t, and x.

Referenced by __attribute__(), ALPAKA_ACCELERATOR_NAMESPACE::lst::addMDToMemory(), Hector::addPartToHepMC(), algorithm(), EwkMuDQM::analyze(), EwkMuLumiMonitorDQM::analyze(), Phase2OTValidateTrackingParticles::analyze(), ValidationMisalignedTracker::analyze(), L1GctValidation::analyze(), MuonGeometrySVGTemplate::analyze(), SiPixelTrackResidualSource::analyze(), MuonAlignmentAnalyzer::analyze(), SiPixelErrorEstimation::analyze(), SiPixelTrackingRecHitsValid::analyze(), analyzer::SiPixelLorentzAngle::analyze(), SiPixelLorentzAnglePCLWorker::analyze(), GlobalTrackerMuonAlignment::analyzeTrackTrack(), GlobalTrackerMuonAlignment::analyzeTrackTrajectory(), BaseProtonTransport::ApplyBeamCorrection(), HGCalDDDConstants::assignCellTrap(), lst_math::ATan2(), Basic2DVector< float >::barePhi(), Basic3DVector< long double >::barePhi(), Basic3DVector< align::Scalar >::barePhi(), Basic3DVector< long double >::bareTheta(), Basic3DVector< align::Scalar >::bareTheta(), mkfit::MkFinder::bkFitFitTracks(), mkfit::MkFinder::bkFitFitTracksBH(), emtf::calc_theta_rad_from_eta(), L1MetPfProducer::CalcMlMet(), emtf::phase2::tp::calcThetaRadFromEta(), tt::Setup::calculateConstants(), CSCPairResidualsConstraint::calculatePhi(), PFMETBenchmark::calculateQuantities(), reco::modules::TrackerTrackHitFilter::checkHitAngle(), reco::modules::TrackerTrackHitFilter::checkPXLCorrClustCharge(), brokenline::circleFit(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::circleFit(), SiPixelErrorEstimation::computeAnglesFromDetPosition(), TotemT2Segmentation::computeBins(), SiStripGainFromData::ComputeChargeOverPath(), HFCherenkov::computeNPE(), StripTopologyBuilder::constructForward(), MuonMETAlgo::correctMETforMuon(), fireworks::createSegment(), CaloDetIdAssociator::crossedElement(), VectorHitBuilderAlgorithm::curvatureANDphi(), CurvilinearTrajectoryParameters::CurvilinearTrajectoryParameters(), FullModelReactionDynamics::Defs1(), HGCalDDDConstants::distFromEdgeTrap(), MuonAlignmentInputXML::do_setposition(), PF_PU_AssoMapAlgos::dR(), geometryDiffVisualization::draw_disk(), Pixel3DDigitizerAlgorithm::driftFor3DSensors(), EcalEleCalibLooper::EEregionCheck(), EcalEleCalibLooper::EERegionId(), trklet::TrackletCalculatorDisplaced::exactprojdisk(), trklet::TrackletCalculatorDisplaced::exacttracklet(), DDHCalTestBeamAlgo::execute(), DDPixFwdDiskAlgo::execute(), DDPixPhase1FwdDiskAlgo::execute(), HIPplots::extractAlignShifts(), brokenline::fastFit(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::fastFit(), riemannFit::fastFit(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::fastFit(), CTPPSFastTrackingProducer::FastReco(), MultiplicityCorrelatorHistogramMaker::fill(), SiPixelHitEfficiencyModule::fill(), HcalTB04Analysis::fillBuffer(), TrackerHitProducer::fillG4MC(), TrackerValidationVariables::fillHitQuantities(), METAnalyzer::fillMonitorElement(), MuonGeometryArrange::fillTree(), EnergyScaleAnalyzer::fillTree(), ColinearityKinematicConstraintT< Dim >::fillValue(), MvaMEtUtilities::finalize(), finalizeCommonMETData(), NoPileUpMEtUtilities::finalizeMEtData(), FakeBeamMonitor::FitAndFill(), BeamMonitor::FitAndFill(), L1GctMet::floatingPointAlgo(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::for(), riemannFit::fromCircleToPerigee(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::fromCircleToPerigee(), FWExpressionValidator::FWExpressionValidator(), UEParameters::get_psin(), hi::GenPlane::getAngle(), heppy::Apc::getApcJetMetMin(), ZdcSD::getEnergyDeposit(), mkfit::getEta(), CastorSD::getFromLibrary(), HCalSD::getHitFibreBundle(), HCalSD::getHitPMT(), CastorShowerLibraryMaker::GetKinematics(), TwoBodyDecayLinearizationPointFinder::getLinearizationPoint(), TrackFitter::getPhi(), mkfit::getPhi(), HGCalTriggerTools::getPhi(), hgcal::RecHitTools::getPhi(), CastorShowerLibrary::getShowerHits(), mkfit::getTheta(), CachedTrajectory::getWideTrajectory(), CosmicMuonGenerator::goodOrientation(), BaseParticlePropagator::helixCentrePhi(), BaseParticlePropagator::helixStartPhi(), SiStripMonitorTrack::hitStudy(), VertexKinematicConstraintT::init(), riemannFit::lineFit(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::lineFit(), reco::mlpf::makeCandidate(), GEMStripTopology::measurementPosition(), CSCRadialStripTopology::measurementPosition(), GlobalTrackerMuonAlignment::misalignMuonL(), muonisolation::CaloExtractor::MuonAtCaloPosition(), MuonDT13ChamberResidual::MuonDT13ChamberResidual(), MuonTrackDT13ChamberResidual::MuonTrackDT13ChamberResidual(), SiPixelFedCablingMapBuilder::myprint(), CosmicMuonGenerator::nextMultiEvent(), HiEvtPlaneFlatten::offsetPsi(), TrackerDpgAnalysis::onTrackAngles(), reco::parser::atan2_f::operator()(), reco::isodeposit::Direction::operator-(), SurveyInputCSCfromPins::orient(), riemannFit::par_uvrtopak(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::par_uvrtopak(), DDHCalEndcapModuleAlgo::parameterLayer(), DDHCalEndcapAlgo::parameterLayer(), HCalEndcapModuleAlgo::parameterLayer(), HCalEndcapAlgo::parameterLayer(), VertexKinematicConstraint::parametersDerivative(), TTStubAlgorithm_official< T >::PatternHitCorrelation(), kinem::phi(), ALPAKA_ACCELERATOR_NAMESPACE::lst::phi(), mtd::MTDGeomUtil::phi(), trklet::L1TStub::phi(), Basic2DVector< float >::phi(), SingleParticleEvent::phi(), ecaldqm::phi(), pat::MET::Vector2::phi(), P2L1HTMHTEmu::phi_cordic(), CSCSegAlgoSK::phiAtZ(), CSCSegAlgoTC::phiAtZ(), CSCSegAlgoRU::phiAtZ(), L1MetPfProducer::PhiFromXY(), ConformalMappingFit::phiRot(), HFFibreFiducial::PMTNumber(), DDHGCalMixRotatedCassette::positionMix(), DDHGCalMixRotatedLayer::positionMix(), DDHGCalMixRotatedFineCassette::positionMix(), HGCalMixRotatedLayer::positionMix(), HGCalMixRotatedCassette::positionMix(), HGCalMixRotatedFineCassette::positionMix(), DDHGCalSiliconRotatedCassette::positionPassive(), HGCalSiliconRotatedCassette::positionPassive(), DDHGCalEEAlgo::positionSensitive(), DDHGCalSiliconRotatedModule::positionSensitive(), DDHGCalSiliconRotatedCassette::positionSensitive(), HGCalSiliconRotatedModule::positionSensitive(), HGCalSiliconRotatedCassette::positionSensitive(), brokenline::prepareBrokenLineData(), PFMETAlgorithmMVA::print(), l1t::Stage1Layer2EtSumAlgorithmImpPP::processEvent(), AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack(), PseudoTopProducer::produce(), edm::CosMuoGenProducer::produce(), L1TrackerEtMissProducer::produce(), L1TkHTMissEmulatorProducer::produce(), RechitClusterProducerT< Trait >::produce(), HiFJRhoFlowModulationProducer::produce(), BaseParticlePropagator::propagateToBeamCylinder(), BaseParticlePropagator::propagateToNominalVertex(), SiPixelTemplate::pushfile(), heppy::Hemisphere::Reconstruct(), AreaSeededTrackingRegionsBuilder::Builder::regionImpl(), ElectronEnergyRegressionEvaluate::regressionUncertaintyNoTrkVar(), ElectronEnergyRegressionEvaluate::regressionUncertaintyNoTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithSubClusters(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVar(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVarV2(), ElectronEnergyRegressionEvaluate::regressionValueNoTrkVar(), ElectronEnergyRegressionEvaluate::regressionValueNoTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionValueWithSubClusters(), ElectronEnergyRegressionEvaluate::regressionValueWithTrkVar(), ElectronEnergyRegressionEvaluate::regressionValueWithTrkVarV1(), ElectronEnergyRegressionEvaluate::regressionValueWithTrkVarV2(), heppy::Hemisphere::RejectISR(), HGCalStage2ClusterDistribution::rotatedphi(), HGCalStage1TruncationImplSA::rotatedphi(), HGCalStage1TruncationImpl::rotatedphi(), KFBasedPixelFitter::run(), riemannFit::scatter_cov_rad(), ALPAKA_ACCELERATOR_NAMESPACE::riemannFit::scatter_cov_rad(), mkfit::MkFinder::selectHitIndices(), tt::SensorModule::SensorModule(), HGCalSD::setDetUnitId(), IdealResult::solve(), mkfit::sortByPhi(), DAClusterizerInZT_vect::split(), GEMStripTopology::strip(), OffsetRadialStripTopology::strip(), CSCRadialStripTopology::strip(), trackerDTC::Stub::Stub(), kinem::theta(), tmtt::TrackerModule::theta(), tmtt::Stub::theta(), tmtt::KFTrackletTrack::theta(), SingleParticleEvent::theta(), Basic3DVector< align::Scalar >::theta(), tmtt::L1track3D::theta(), tmtt::L1fittedTrack::theta(), align::toAngles(), ConversionSeedFinder::trackStateFromClusters(), SiStripMonitorTrack::trajectoryStudy(), brokenline::translateKarimaki(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::translateKarimaki(), HcalNumberingFromDDD::unitID(), TrackingVerboseAction::update(), ZdcTestAnalysis::update(), CastorTestAnalysis::update(), FP420Test::update(), BscTest::update(), TwoTrackMinimumDistanceHelixHelix::updateCoeffs(), VertexKinematicConstraint::value(), ColinearityKinematicConstraint::value(), L1GctHtMissLut::value(), MuonAlignmentOutputXML::writeComponents(), and z().

648  {
649  MPlex<T, D1, D2, N> t;
650  return t.atan2(y, x);
651  }
float x

◆ cos()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::cos ( const MPlex< T, D1, D2, N > &  a)

Definition at line 628 of file Matriplex.h.

References a, and submitPVValidationJobs::t.

Referenced by __attribute__(), sincos(), and Matriplex::internal::sincos4().

628  {
629  MPlex<T, D1, D2, N> t;
630  return t.cos(a);
631  }
double a
Definition: hdecay.h:121

◆ hypot()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::hypot ( const MPlex< T, D1, D2, N > &  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 616 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

Referenced by __attribute__(), mkfit::MkFinder::addBestHit(), RegressionHelper::applyCombinationRegression(), objects.METAnalyzer.METAnalyzer::applyDeltaMet(), mkfit::MkFinder::bkFitFitTracks(), mkfit::MkFinder::bkFitFitTracksBH(), L1MetPfProducer::CalcMlMet(), PFEGammaAlgo::calculateEleMVA(), PhotonEnergyCalibratorRun2::calibrate(), ElectronEnergyCalibratorRun2::calibrate(), mkfit::TrackBase::canReachRadius(), MuonGEMBaseHarvestor::computeEfficiency(), DQMGenericClient::computeEfficiency(), JetReCalibrator.Type1METCorrector::correct(), mkfit::TrackBase::d0BeamSpot(), L1JetRecoTreeProducer::doPFMetNoMu(), L1JetRecoTreeProducer::doPUPPIMetNoMu(), HLTRegionalEcalResonanceFilter::doSelection(), pat::PATMuonProducer::embedHighLevel(), pat::PATElectronProducer::embedHighLevel(), trklet::TrackletEventProcessor::event(), Phase2TrackerMonitorDigi::fillITPixelDigiHistos(), LHETablesProducer::fillLHEObjectTable(), Phase2TrackerMonitorDigi::fillOTDigiHistos(), Phase2TrackerValidateDigi::fillSimHitInfo(), mkfit::MkFinder::findCandidates(), GEMEfficiencyAnalyzer::findCSCSegmentCosmics(), GenParticles2HepMCConverter::FourVector(), Point::GetSigmaDeltaMu(), mkfit::kalmanOperation(), mkfit::kalmanPropagateAndComputeChi2(), mkfit::kalmanPropagateAndUpdate(), objects.METAnalyzer::makeGenTkMet(), mkfit::TrackBase::maxReachRadius(), LowPtElectronModifier::modifyObject(), l1tpf::ParametricResolution::operator()(), reco::parser::hypot_f::operator()(), mkfit::MkFitter::printPt(), DeepMETProducer::produce(), DeepMETSonicProducer::produce(), L1TPFMetNoMuProducer::produce(), PseudoTopProducer::produce(), JetConstituentTableProducer< T >::produce(), PATTracksToPackedCandidates::produce(), EvtPlaneProducer::produce(), L1FPGATrackProducer::produce(), mkfit::mini_propagators::InitialState::propagate_to_r(), mkfit::mini_propagators::InitialStatePlex::propagate_to_r(), mkfit::propagateHelixToPlaneMPlex(), mkfit::propagateHelixToZMPlex(), mkfit::MkBase::propagateTracksToHitR(), mkfit::MkBase::propagateTracksToPCAZ(), trklet::L1TStub::r(), mkfit::TrackBase::rAtZ(), EcalUncalibRecHitWorkerMultiFit::run(), pf2pat::IPCutPFCandidateSelectorDefinition::select(), MultiTrackSelector::select(), mkfit::MkFinder::selectHitIndices(), mkfit::MkFinder::selectHitIndicesV2(), pat::LeptonUpdater< T >::setDZ(), EGEtScaleSysModifier::setEcalEnergy(), ElectronEnergyCalibrator::setEcalEnergy(), PhotonEnergyCalibrator::setEnergyAndSystVarations(), JetReCalibrator::setFakeRawMETOnOldMiniAODs(), JetId::setNNVectorVar(), pat::MET::shiftedP4(), pat::MET::shiftedP4_74x(), XHistogram::splitSegment(), DD4hep_XHistogram::splitSegment(), objects.METAnalyzer::sumXY(), reco::ForwardProton::t(), and mkfit::TrackBase::zAtR().

616  {
617  MPlex<T, D1, D2, N> t;
618  return t.hypot(a, b);
619  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ invertCholesky() [1/2]

template<typename T , idx_t D, idx_t N>
void Matriplex::invertCholesky ( MPlexVec< MPlex< T, D, D, N >> &  A,
int  n_to_process = 0 
)

Definition at line 126 of file MatriplexVector.h.

References A, mps_fire::i, invertCholesky(), and np.

126  {
127  const int np = n_to_process ? n_to_process : A.size();
128 
129  for (int i = 0; i < np; ++i) {
130  invertCholesky(A[i]);
131  }
132  }
int np
Definition: AMPTWrapper.h:43
void invertCholesky(MPlexVec< MPlex< T, D, D, N >> &A, int n_to_process=0)
Definition: APVGainStruct.h:7

◆ invertCholesky() [2/2]

template<typename T , idx_t D, idx_t N>
void Matriplex::invertCholesky ( MPlex< T, D, D, N > &  A)

◆ invertCholeskySym() [1/2]

template<typename T , idx_t D, idx_t N>
void Matriplex::invertCholeskySym ( MPlexVec< MPlexSym< T, D, N >> &  A,
int  n_to_process = 0 
)

Definition at line 144 of file MatriplexVector.h.

References A, mps_fire::i, invertCholeskySym(), and np.

144  {
145  const int np = n_to_process ? n_to_process : A.size();
146 
147  for (int i = 0; i < np; ++i) {
149  }
150  }
void invertCholeskySym(MPlexVec< MPlexSym< T, D, N >> &A, int n_to_process=0)
int np
Definition: AMPTWrapper.h:43
Definition: APVGainStruct.h:7

◆ invertCholeskySym() [2/2]

template<typename T , idx_t D, idx_t N>
void Matriplex::invertCholeskySym ( MPlexSym< T, D, N > &  A)

◆ invertCramer() [1/2]

template<typename T , idx_t D, idx_t N>
void Matriplex::invertCramer ( MPlexVec< MPlex< T, D, D, N >> &  A,
int  n_to_process = 0 
)

Definition at line 117 of file MatriplexVector.h.

References A, mps_fire::i, invertCramer(), and np.

117  {
118  const int np = n_to_process ? n_to_process : A.size();
119 
120  for (int i = 0; i < np; ++i) {
121  invertCramer(A[i]);
122  }
123  }
int np
Definition: AMPTWrapper.h:43
void invertCramer(MPlexVec< MPlex< T, D, D, N >> &A, int n_to_process=0)
Definition: APVGainStruct.h:7

◆ invertCramer() [2/2]

template<typename T , idx_t D, idx_t N>
void Matriplex::invertCramer ( MPlex< T, D, D, N > &  A,
double *  determ = nullptr 
)

◆ invertCramerSym() [1/2]

template<typename T , idx_t D, idx_t N>
void Matriplex::invertCramerSym ( MPlexVec< MPlexSym< T, D, N >> &  A,
int  n_to_process = 0 
)

Definition at line 135 of file MatriplexVector.h.

References A, mps_fire::i, invertCramerSym(), and np.

135  {
136  const int np = n_to_process ? n_to_process : A.size();
137 
138  for (int i = 0; i < np; ++i) {
139  invertCramerSym(A[i]);
140  }
141  }
int np
Definition: AMPTWrapper.h:43
void invertCramerSym(MPlexVec< MPlexSym< T, D, N >> &A, int n_to_process=0)
Definition: APVGainStruct.h:7

◆ invertCramerSym() [2/2]

template<typename T , idx_t D, idx_t N>
void Matriplex::invertCramerSym ( MPlexSym< T, D, N > &  A,
double *  determ = nullptr 
)

◆ max()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::max ( const MPlex< T, D1, D2, N > &  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 723 of file Matriplex.h.

References a, b, mps_fire::i, and submitPVValidationJobs::t.

Referenced by min_max().

723  {
724  MPlex<T, D1, D2, N> t;
725  for (idx_t i = 0; i < a.kTotSize; ++i) {
726  t.fArray[i] = std::max(a.fArray[i], b.fArray[i]);
727  }
728  return t;
729  }
MPlex< T, D1, D2, N > max(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:723
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ min()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::min ( const MPlex< T, D1, D2, N > &  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 714 of file Matriplex.h.

References a, b, mps_fire::i, and submitPVValidationJobs::t.

Referenced by min_max().

714  {
715  MPlex<T, D1, D2, N> t;
716  for (idx_t i = 0; i < a.kTotSize; ++i) {
717  t.fArray[i] = std::min(a.fArray[i], b.fArray[i]);
718  }
719  return t;
720  }
MPlex< T, D1, D2, N > min(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:714
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ min_max()

template<typename T , idx_t D1, idx_t D2, idx_t N>
void Matriplex::min_max ( const MPlex< T, D1, D2, N > &  a,
const MPlex< T, D1, D2, N > &  b,
MPlex< T, D1, D2, N > &  min,
MPlex< T, D1, D2, N > &  max 
)

Definition at line 703 of file Matriplex.h.

References a, b, mps_fire::i, max(), and min().

Referenced by mkfit::MkFinder::selectHitIndicesV2().

706  {
707  for (idx_t i = 0; i < a.kTotSize; ++i) {
708  min.fArray[i] = std::min(a.fArray[i], b.fArray[i]);
709  max.fArray[i] = std::max(a.fArray[i], b.fArray[i]);
710  }
711  }
MPlex< T, D1, D2, N > min(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:714
MPlex< T, D1, D2, N > max(const MPlex< T, D1, D2, N > &a, const MPlex< T, D1, D2, N > &b)
Definition: Matriplex.h:723
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ multiply() [1/4]

template<typename T , idx_t D1, idx_t D2, idx_t D3, idx_t N>
void Matriplex::multiply ( const MPlexVec< MPlex< T, D1, D2, N >> &  A,
const MPlexVec< MPlex< T, D2, D3, N >> &  B,
MPlexVec< MPlex< T, D1, D3, N >> &  C,
int  n_to_process = 0 
)

Definition at line 53 of file MatriplexVector.h.

References A, cms::cuda::assert(), B, correctionTermsCaloMet_cff::C, mps_fire::i, multiply(), and np.

56  {
57  assert(A.size() == B.size());
58  assert(A.size() == C.size());
59 
60  const int np = n_to_process ? n_to_process : A.size();
61 
62  for (int i = 0; i < np; ++i) {
63  multiply(A[i], B[i], C[i]);
64  }
65  }
Definition: APVGainStruct.h:7
assert(be >=bs)
int np
Definition: AMPTWrapper.h:43
void multiply(const MPlexVec< MPlexSym< T, D, N >> &A, const MPlexVec< MPlexSym< T, D, N >> &B, MPlexVec< MPlex< T, D, D, N >> &C, int n_to_process=0)
Definition: APVGainStruct.h:7

◆ multiply() [2/4]

template<typename T , idx_t D, idx_t N>
void Matriplex::multiply ( const MPlexVec< MPlexSym< T, D, N >> &  A,
const MPlexVec< MPlexSym< T, D, N >> &  B,
MPlexVec< MPlex< T, D, D, N >> &  C,
int  n_to_process = 0 
)

Definition at line 100 of file MatriplexVector.h.

References A, cms::cuda::assert(), B, correctionTermsCaloMet_cff::C, mps_fire::i, multiply(), and np.

103  {
104  assert(A.size() == B.size());
105  assert(A.size() == C.size());
106 
107  const int np = n_to_process ? n_to_process : A.size();
108 
109  for (int i = 0; i < np; ++i) {
110  multiply(A[i], B[i], C[i]);
111  }
112  }
Definition: APVGainStruct.h:7
assert(be >=bs)
int np
Definition: AMPTWrapper.h:43
void multiply(const MPlexVec< MPlexSym< T, D, N >> &A, const MPlexVec< MPlexSym< T, D, N >> &B, MPlexVec< MPlex< T, D, D, N >> &C, int n_to_process=0)
Definition: APVGainStruct.h:7

◆ multiply() [3/4]

template<typename T , idx_t D, idx_t N>
void Matriplex::multiply ( const MPlexSym< T, D, N > &  A,
const MPlexSym< T, D, N > &  B,
MPlex< T, D, D, N > &  C 
)

Definition at line 348 of file MatriplexSym.h.

References A, B, correctionTermsCaloMet_cff::C, and Matriplex::SymMultiplyCls< T, D, N >::multiply().

348  {
350  }
Definition: APVGainStruct.h:7
void multiply(const MPlexSym< T, D, N > &A, const MPlexSym< T, D, N > &B, MPlex< T, D, D, N > &C)
Definition: MatriplexSym.h:348
Definition: APVGainStruct.h:7

◆ multiply() [4/4]

template<typename T , idx_t D, idx_t N>
void Matriplex::multiply ( const MPlex< T, D, D, N > &  A,
const MPlex< T, D, D, N > &  B,
MPlex< T, D, D, N > &  C 
)

Definition at line 881 of file Matriplex.h.

References A, B, correctionTermsCaloMet_cff::C, Matriplex::MultiplyCls< T, D, N >::multiply(), and N.

Referenced by multiply(), multiply3in(), and AlignmentExtendedCorrelationsEntry::operator*=().

881  {
882 #ifdef DEBUG
883  printf("Multipl %d %d\n", D, N);
884 #endif
885 
887  }
Definition: APVGainStruct.h:7
void multiply(const MPlex< T, D, D, N > &A, const MPlex< T, D, D, N > &B, MPlex< T, D, D, N > &C)
Definition: Matriplex.h:881
#define N
Definition: blowfish.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
Definition: APVGainStruct.h:7

◆ multiply3in()

template<typename T , idx_t D1, idx_t D2, idx_t D3, idx_t N>
void Matriplex::multiply3in ( MPlexVec< MPlex< T, D1, D2, N >> &  A,
MPlexVec< MPlex< T, D2, D3, N >> &  B,
MPlexVec< MPlex< T, D1, D3, N >> &  C,
int  n_to_process = 0 
)

Definition at line 83 of file MatriplexVector.h.

References A, cms::cuda::assert(), B, correctionTermsCaloMet_cff::C, mps_fire::i, multiply(), and np.

86  {
87  assert(A.size() == B.size());
88  assert(A.size() == C.size());
89 
90  const int np = n_to_process ? n_to_process : A.size();
91 
92  for (int i = 0; i < np; ++i) {
93  multiply(A[i], B[i], C[i]);
94  multiply(B[i], C[i], A[i]);
95  multiply(C[i], A[i], B[i]);
96  }
97  }
Definition: APVGainStruct.h:7
assert(be >=bs)
int np
Definition: AMPTWrapper.h:43
void multiply(const MPlexVec< MPlexSym< T, D, N >> &A, const MPlexVec< MPlexSym< T, D, N >> &B, MPlexVec< MPlex< T, D, D, N >> &C, int n_to_process=0)
Definition: APVGainStruct.h:7

◆ multiplyGeneral() [1/2]

template<typename T , idx_t D1, idx_t D2, idx_t D3, idx_t N>
void Matriplex::multiplyGeneral ( const MPlexVec< MPlex< T, D1, D2, N >> &  A,
const MPlexVec< MPlex< T, D2, D3, N >> &  B,
MPlexVec< MPlex< T, D1, D3, N >> &  C,
int  n_to_process = 0 
)

Definition at line 68 of file MatriplexVector.h.

References A, cms::cuda::assert(), B, correctionTermsCaloMet_cff::C, mps_fire::i, multiplyGeneral(), and np.

71  {
72  assert(A.size() == B.size());
73  assert(A.size() == C.size());
74 
75  const int np = n_to_process ? n_to_process : A.size();
76 
77  for (int i = 0; i < np; ++i) {
78  multiplyGeneral(A[i], B[i], C[i]);
79  }
80  }
Definition: APVGainStruct.h:7
void multiplyGeneral(const MPlexVec< MPlex< T, D1, D2, N >> &A, const MPlexVec< MPlex< T, D2, D3, N >> &B, MPlexVec< MPlex< T, D1, D3, N >> &C, int n_to_process=0)
assert(be >=bs)
int np
Definition: AMPTWrapper.h:43
Definition: APVGainStruct.h:7

◆ multiplyGeneral() [2/2]

template<typename T , idx_t D1, idx_t D2, idx_t D3, idx_t N>
void Matriplex::multiplyGeneral ( const MPlex< T, D1, D2, N > &  A,
const MPlex< T, D2, D3, N > &  B,
MPlex< T, D1, D3, N > &  C 
)

Definition at line 736 of file Matriplex.h.

References A, B, correctionTermsCaloMet_cff::C, trklet::D3, mps_fire::i, dqmiolumiharvest::j, isotrackApplyRegressor::k, N, and create_idmaps::n.

Referenced by multiplyGeneral().

736  {
737  for (idx_t i = 0; i < D1; ++i) {
738  for (idx_t j = 0; j < D3; ++j) {
739  const idx_t ijo = N * (i * D3 + j);
740 
741 #pragma omp simd
742  for (idx_t n = 0; n < N; ++n) {
743  C.fArray[ijo + n] = 0;
744  }
745 
746  for (idx_t k = 0; k < D2; ++k) {
747  const idx_t iko = N * (i * D2 + k);
748  const idx_t kjo = N * (k * D3 + j);
749 
750 #pragma omp simd
751  for (idx_t n = 0; n < N; ++n) {
752  C.fArray[ijo + n] += A.fArray[iko + n] * B.fArray[kjo + n];
753  }
754  }
755  }
756  }
757  }
Divides< B, C > D2
Definition: Factorize.h:137
Definition: APVGainStruct.h:7
Divides< A, C > D1
Definition: Factorize.h:136
#define N
Definition: blowfish.cc:9
Definition: APVGainStruct.h:7

◆ negate()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::negate ( const MPlex< T, D1, D2, N > &  a)

Definition at line 497 of file Matriplex.h.

References a, and submitPVValidationJobs::t.

Referenced by __attribute__().

497  {
498  MPlex<T, D1, D2, N> t = a;
499  t.negate();
500  return t;
501  }
double a
Definition: hdecay.h:121

◆ negate_if_ltz()

template<typename T , typename TT , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::negate_if_ltz ( const MPlex< T, D1, D2, N > &  a,
const MPlex< TT, D1, D2, N > &  sign 
)

Definition at line 504 of file Matriplex.h.

References a, Validation_hcalonly_cfi::sign, and submitPVValidationJobs::t.

Referenced by __attribute__().

504  {
505  MPlex<T, D1, D2, N> t = a;
506  t.negate_if_ltz(sign);
507  return t;
508  }
double a
Definition: hdecay.h:121

◆ operator*() [1/3]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator* ( const MPlex< T, D1, D2, N > &  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 525 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

525  {
526  MPlex<T, D1, D2, N> t = a;
527  t *= b;
528  return t;
529  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator*() [2/3]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator* ( const MPlex< T, D1, D2, N > &  a,
T  b 
)

Definition at line 553 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

553  {
554  MPlex<T, D1, D2, N> t = a;
555  t *= b;
556  return t;
557  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator*() [3/3]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator* ( T  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 581 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

581  {
582  MPlex<T, D1, D2, N> t = a;
583  t *= b;
584  return t;
585  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator+() [1/3]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator+ ( const MPlex< T, D1, D2, N > &  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 511 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

511  {
512  MPlex<T, D1, D2, N> t = a;
513  t += b;
514  return t;
515  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator+() [2/3]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator+ ( const MPlex< T, D1, D2, N > &  a,
T  b 
)

Definition at line 539 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

539  {
540  MPlex<T, D1, D2, N> t = a;
541  t += b;
542  return t;
543  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator+() [3/3]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator+ ( T  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 567 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

567  {
568  MPlex<T, D1, D2, N> t = a;
569  t += b;
570  return t;
571  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator-() [1/4]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator- ( const MPlex< T, D1, D2, N > &  a)

Definition at line 490 of file Matriplex.h.

References a, and submitPVValidationJobs::t.

Referenced by __attribute__().

490  {
491  MPlex<T, D1, D2, N> t = a;
492  t.negate();
493  return t;
494  }
double a
Definition: hdecay.h:121

◆ operator-() [2/4]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator- ( const MPlex< T, D1, D2, N > &  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 518 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

518  {
519  MPlex<T, D1, D2, N> t = a;
520  t -= b;
521  return t;
522  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator-() [3/4]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator- ( const MPlex< T, D1, D2, N > &  a,
T  b 
)

Definition at line 546 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

546  {
547  MPlex<T, D1, D2, N> t = a;
548  t -= b;
549  return t;
550  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator-() [4/4]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator- ( T  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 574 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

574  {
575  MPlex<T, D1, D2, N> t = a;
576  t -= b;
577  return t;
578  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator/() [1/3]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator/ ( const MPlex< T, D1, D2, N > &  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 532 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

532  {
533  MPlex<T, D1, D2, N> t = a;
534  t /= b;
535  return t;
536  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator/() [2/3]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator/ ( const MPlex< T, D1, D2, N > &  a,
T  b 
)

Definition at line 560 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

560  {
561  MPlex<T, D1, D2, N> t = a;
562  t /= b;
563  return t;
564  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ operator/() [3/3]

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::operator/ ( T  a,
const MPlex< T, D1, D2, N > &  b 
)

Definition at line 588 of file Matriplex.h.

References a, b, and submitPVValidationJobs::t.

588  {
589  MPlex<T, D1, D2, N> t = a;
590  t /= b;
591  return t;
592  }
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121

◆ round_up_align64()

constexpr std::size_t Matriplex::round_up_align64 ( std::size_t  size)

◆ sin()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::sin ( const MPlex< T, D1, D2, N > &  a)

Definition at line 622 of file Matriplex.h.

References a, and submitPVValidationJobs::t.

Referenced by __attribute__(), sincos(), and Matriplex::internal::sincos4().

622  {
623  MPlex<T, D1, D2, N> t;
624  return t.sin(a);
625  }
double a
Definition: hdecay.h:121

◆ sincos()

template<typename T , idx_t D1, idx_t D2, idx_t N>
void Matriplex::sincos ( const MPlex< T, D1, D2, N > &  a,
MPlex< T, D1, D2, N > &  s,
MPlex< T, D1, D2, N > &  c 
)

Definition at line 634 of file Matriplex.h.

References a, DummyCfis::c, cos(), mps_fire::i, alignCSCRings::s, and sin().

Referenced by __attribute__().

634  {
635  for (idx_t i = 0; i < a.kTotSize; ++i) {
636  s.fArray[i] = std::sin(a.fArray[i]);
637  c.fArray[i] = std::cos(a.fArray[i]);
638  }
639  }
MPlex< T, D1, D2, N > sin(const MPlex< T, D1, D2, N > &a)
Definition: Matriplex.h:622
double a
Definition: hdecay.h:121
MPlex< T, D1, D2, N > cos(const MPlex< T, D1, D2, N > &a)
Definition: Matriplex.h:628

◆ sincos4()

template<typename T , idx_t D1, idx_t D2, idx_t N>
void Matriplex::sincos4 ( const MPlex< T, D1, D2, N > &  a,
MPlex< T, D1, D2, N > &  s,
MPlex< T, D1, D2, N > &  c 
)

Definition at line 696 of file Matriplex.h.

References a, DummyCfis::c, and alignCSCRings::s.

Referenced by __attribute__().

696  {
697  a.sincos4(s, c);
698  }
double a
Definition: hdecay.h:121

◆ sqr()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::sqr ( const MPlex< T, D1, D2, N > &  a)

Definition at line 601 of file Matriplex.h.

References a, and submitPVValidationJobs::t.

Referenced by __attribute__().

601  {
602  MPlex<T, D1, D2, N> t;
603  return t.sqr(a);
604  }
double a
Definition: hdecay.h:121

◆ sqrt()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::sqrt ( const MPlex< T, D1, D2, N > &  a)

Definition at line 610 of file Matriplex.h.

References a, and submitPVValidationJobs::t.

Referenced by __attribute__(), Matriplex::CholeskyInverter< T, 3, N >::invert(), and mkfit::MkFinder::selectHitIndicesV2().

610  {
611  MPlex<T, D1, D2, N> t;
612  return t.sqrt(a);
613  }
double a
Definition: hdecay.h:121

◆ tan()

template<typename T , idx_t D1, idx_t D2, idx_t N>
MPlex<T, D1, D2, N> Matriplex::tan ( const MPlex< T, D1, D2, N > &  a)

Definition at line 642 of file Matriplex.h.

References a, and submitPVValidationJobs::t.

Referenced by __attribute__().

642  {
643  MPlex<T, D1, D2, N> t;
644  return t.tan(a);
645  }
double a
Definition: hdecay.h:121

Variable Documentation

◆ gSymOffsets

const idx_t Matriplex::gSymOffsets[7][36]
Initial value:
= {
{},
{},
{0, 1, 1, 2},
{0, 1, 3, 1, 2, 4, 3, 4, 5},
{},
{0, 1, 3, 6, 10, 1, 2, 4, 7, 11, 3, 4, 5, 8, 12, 6, 7, 8, 9, 13, 10, 11, 12, 13, 14},
{0, 1, 3, 6, 10, 15, 1, 2, 4, 7, 11, 16, 3, 4, 5, 8, 12, 17,
6, 7, 8, 9, 13, 18, 10, 11, 12, 13, 14, 19, 15, 16, 17, 18, 19, 20}}

Definition at line 13 of file MatriplexSym.h.

Referenced by __attribute__().