Project
Loading...
Searching...
No Matches
SymMatrixSolver.h
Go to the documentation of this file.
1
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3
// All rights not expressly granted are reserved.
4
//
5
// This software is distributed under the terms of the GNU General Public
6
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7
//
8
// In applying this license CERN does not waive the privileges and immunities
9
// granted to it by virtue of its status as an Intergovernmental Organization
10
// or submit itself to any jurisdiction.
11
17
18
#ifndef ALICEO2_GPUCOMMON_TPCFASTTRANSFORMATION_SYMMATRIXSOLVER_H
19
#define ALICEO2_GPUCOMMON_TPCFASTTRANSFORMATION_SYMMATRIXSOLVER_H
20
21
#include "
GPUCommonRtypes.h
"
22
#include <vector>
23
#include <cassert>
24
#include <algorithm>
25
26
namespace
o2::math_utils
27
{
28
36
class
SymMatrixSolver
37
{
38
public
:
39
SymMatrixSolver
(
int
N,
int
M) : mN(N), mM(M), mShift(mN + mM)
40
{
41
assert(N > 0 && M > 0);
42
mA.resize(mN * mShift, 0.);
43
}
44
46
double
&
A
(
int
i
,
int
j
)
47
{
48
auto
ij = std::minmax(
i
,
j
);
49
assert(ij.first >= 0 && ij.second < mN);
50
return
mA[ij.first * mShift + ij.second];
51
}
52
54
double
&
B
(
int
i
,
int
j
)
55
{
56
assert(
i
>= 0 && i < mN && j >= 0 &&
j
< mM);
57
return
mA[
i
* mShift + mN +
j
];
58
}
59
61
void
solve
();
62
64
void
print
();
65
67
static
int
test
(
bool
prn = 0);
68
69
private
:
70
private
:
71
int
mN = 0;
72
int
mM = 0;
73
int
mShift = 0;
74
std::vector<double> mA;
75
76
ClassDefNV(
SymMatrixSolver
, 0);
77
};
78
79
}
// namespace o2::math_utils
80
81
#endif
i
int32_t i
Definition
GPUCommonAlgorithm.h:443
GPUCommonRtypes.h
j
uint32_t j
Definition
RawData.h:0
o2::math_utils::SymMatrixSolver
Definition
SymMatrixSolver.h:37
o2::math_utils::SymMatrixSolver::SymMatrixSolver
SymMatrixSolver(int N, int M)
Definition
SymMatrixSolver.h:39
o2::math_utils::SymMatrixSolver::print
void print()
Definition
SymMatrixSolver.cxx:64
o2::math_utils::SymMatrixSolver::A
double & A(int i, int j)
access to A elements
Definition
SymMatrixSolver.h:46
o2::math_utils::SymMatrixSolver::B
double & B(int i, int j)
access to B elements
Definition
SymMatrixSolver.h:54
o2::math_utils::SymMatrixSolver::solve
void solve()
Definition
SymMatrixSolver.cxx:28
o2::math_utils
Definition
CachingTF1.h:23
test
FIXME: do not use data model tables.
Definition
benchmark_ASoAHelpers.cxx:26
Common
MathUtils
include
MathUtils
SymMatrixSolver.h
Generated on Tue Feb 25 2025 22:43:42 for Project by
1.9.8