Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atlas
athena
Merge requests
!37036
RungeKuttaUtils: Add comments on what exactly we do
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
RungeKuttaUtils: Add comments on what exactly we do
ATLAS-EGamma/athena:RkUtils_3x5Helper
into
master
Overview
24
Commits
8
Pipelines
8
Changes
1
Merged
Christos Anastopoulos
requested to merge
ATLAS-EGamma/athena:RkUtils_3x5Helper
into
master
4 years ago
Overview
12
Commits
8
Pipelines
8
Changes
1
Expand
0
0
Merge request reports
Compare
master
version 7
25c3ea18
4 years ago
version 6
b7e25571
4 years ago
version 5
3ce463bb
4 years ago
version 4
4b985b97
4 years ago
version 3
49ee1852
4 years ago
version 2
7d10a8d5
4 years ago
version 1
b631c28f
4 years ago
master (base)
and
latest version
latest version
844cd49f
8 commits,
4 years ago
version 7
25c3ea18
7 commits,
4 years ago
version 6
b7e25571
6 commits,
4 years ago
version 5
3ce463bb
5 commits,
4 years ago
version 4
4b985b97
4 commits,
4 years ago
version 3
49ee1852
3 commits,
4 years ago
version 2
7d10a8d5
2 commits,
4 years ago
version 1
b631c28f
1 commit,
4 years ago
1 file
+
51
−
19
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Tracking/TrkExtrapolation/TrkExUtils/src/RungeKuttaUtils.cxx
+
51
−
19
Options
@@ -141,45 +141,77 @@ globalToLocalVecHelper(double* ATH_RESTRICT P,
}
/* Helper to replace repeated calculation of
* 5x1 = 5x3 * 3X1
* for the Jacobian
*
* E.g a calculation like :
* Jac[ 0] = Ax[0]*P[ 7]+Ax[1]*P[ 8]+Ax[2]*P[ 9]; // dL0/dL0
* Jac[ 1] = Ax[0]*P[14]+Ax[1]*P[15]+Ax[2]*P[16]; // dL0/dL1
* Jac[ 2] = Ax[0]*P[21]+Ax[1]*P[22]+Ax[2]*P[23]; // dL0/dPhi
* Jac[ 3] = Ax[0]*P[28]+Ax[1]*P[29]+Ax[2]*P[30]; // dL0/dThe
* Jac[ 4] = Ax[0]*P[35]+Ax[1]*P[36]+Ax[2]*P[37]; // dL0/dCM
* Jac[ 5] = Ay[0]*P[ 7]+Ay[1]*P[ 8]+Ay[2]*P[ 9]; // dL1/dL0
* Jac[ 6] = Ay[0]*P[14]+Ay[1]*P[15]+Ay[2]*P[16]; // dL1/dL1
* Jac[ 7] = Ay[0]*P[21]+Ay[1]*P[22]+Ay[2]*P[23]; // dL1/dPhi
* Jac[ 8] = Ay[0]*P[28]+Ay[1]*P[29]+Ay[2]*P[30]; // dL1/dThe
* Jac[ 9] = Ay[0]*P[35]+Ay[1]*P[36]+Ay[2]*P[37]; // dL1/dCM
* is replaces with
* mutl3x5Helper(&Jac[0],Ax,&P[7]);
* mutl3x5Helper(&Jac[5],Ay,&P[7]);
*/
inline
void
mutl3x5Helper
(
double
*
ATH_RESTRICT
Jac
,
const
double
*
ATH_RESTRICT
V
,
const
double
*
ATH_RESTRICT
P
)
{
/* The following matrix multiplication
* 5x1 = 5x3 * 3X1
* for the Jacobian
* is repeated multiple times
* Jac[ 0] = Ax[0]*P[ 7]+Ax[1]*P[ 8]+Ax[2]*P[ 9]; // dL0/dL0
* Jac[ 1] = Ax[0]*P[14]+Ax[1]*P[15]+Ax[2]*P[16]; // dL0/dL1
* Jac[ 2] = Ax[0]*P[21]+Ax[1]*P[22]+Ax[2]*P[23]; // dL0/dPhi
* Jac[ 3] = Ax[0]*P[28]+Ax[1]*P[29]+Ax[2]*P[30]; // dL0/dThe
* Jac[ 4] = Ax[0]*P[35]+Ax[1]*P[36]+Ax[2]*P[37]; // dL0/dCM
* Jac[ 5] = Ay[0]*P[ 7]+Ay[1]*P[ 8]+Ay[2]*P[ 9]; // dL1/dL0
* Jac[ 6] = Ay[0]*P[14]+Ay[1]*P[15]+Ay[2]*P[16]; // dL1/dL1
* Jac[ 7] = Ay[0]*P[21]+Ay[1]*P[22]+Ay[2]*P[23]; // dL1/dPhi
* Jac[ 8] = Ay[0]*P[28]+Ay[1]*P[29]+Ay[2]*P[30]; // dL1/dThe
* Jac[ 9] = Ay[0]*P[35]+Ay[1]*P[36]+Ay[2]*P[37]; // dL1/dCM
*/
using
vec2
=
CxxUtils
::
vec
<
double
,
2
>
;
/*
* |Jac[0] |= |V[0]| * |P[0]| + |V[1]| * |P[1] | + |V[2]| * |P[2] |
* |Jac[1] |= |V[0]| * |P[7]| + |V[1]| * |P[8] | + |V[2]| * |P[9] |
* |Jac[2] |= |V[0]| * |P[14]| + |V[1]| * |P[15]| + |V[2]| * |P[16]|
* |Jac[3] |= |V[0]| * |P[21]| + |V[1]| * |P[22]| + |V[2]| * |P[23]|
*
* Jac[4] = V[0] * P[28] + V[1] * P[29] + V[2] * P[30];
*
* The first do we do in vertical SIMD (128 bit ) fashion
*
* {Jac[0] | Jac[1]} =
* {V[0] | V[0]} * {P[0] | P[7]} +
* {V[1] | V[1]} * {P[1] | P[8]}
* {V[2] | V[2]} * {P[16] | P[23}
*
* {Jac[2] | Jac[3]} =
* {V[0] | V[0]} * {P[14] | P[21]} +
* {V[1] | V[1]} * {P[15] | P[22]} +
* {V[2] | V[2]} * {P[16] | P[23}
*
* Where {} is a SIMD size 2 vector
*
* The remaining odd element is done at the end
* Jac[4] = V[0] * P[28] + V[1] * P[29] + V[2] * P[30];
*/
using
vec2
=
CxxUtils
::
vec
<
double
,
2
>
;
vec2
V1
=
{
V
[
0
],
V
[
0
]
};
vec2
V2
=
{
V
[
1
],
V
[
1
]
};
vec2
V3
=
{
V
[
2
],
V
[
2
]
};
// 1st
and
2nd element
// 1st
/
2nd element
vec2
P1v1
=
{
P
[
0
],
P
[
7
]
};
vec2
P1v2
=
{
P
[
1
],
P
[
8
]
};
vec2
P1v3
=
{
P
[
2
],
P
[
9
]
};
vec2
res1
=
V1
*
P1v1
+
V2
*
P1v2
+
V3
*
P1v3
;
CxxUtils
::
vstore
(
&
Jac
[
0
],
res1
);
// 3th
and
4th element
// 3th
/
4th element
vec2
P2v1
=
{
P
[
14
],
P
[
21
]
};
vec2
P2v2
=
{
P
[
15
],
P
[
22
]
};
vec2
P2v3
=
{
P
[
16
],
P
[
23
]
};
vec2
res2
=
V1
*
P2v1
+
V2
*
P2v2
+
V3
*
P2v3
;
CxxUtils
::
vstore
(
&
Jac
[
2
],
res2
);
//store results
CxxUtils
::
vstore
(
&
Jac
[
0
],
res1
);
CxxUtils
::
vstore
(
&
Jac
[
2
],
res2
);
// The 5th element
Jac
[
4
]
=
V
[
0
]
*
P
[
28
]
+
V
[
1
]
*
P
[
29
]
+
V
[
2
]
*
P
[
30
];
}
Loading