Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cbmroot
Manage
Activity
Members
Labels
Plan
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Computing
cbmroot
Commits
010dc976
Commit
010dc976
authored
1 year ago
by
Dominik Smith
Browse files
Options
Downloads
Patches
Plain Diff
Applied PODVector in cbm::algo::tof::Hitfind. Modified compat/OpenMP.h.
parent
7d6e5ce5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1494
OpenMP parallelization of cbm::algo::tof::Hitfind.
Pipeline
#25650
passed
1 year ago
Stage: build
Stage: package
Stage: verify
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
algo/base/compat/OpenMP.h
+2
-0
2 additions, 0 deletions
algo/base/compat/OpenMP.h
algo/detectors/tof/Hitfind.cxx
+5
-11
5 additions, 11 deletions
algo/detectors/tof/Hitfind.cxx
algo/detectors/tof/Hitfind.h
+3
-1
3 additions, 1 deletion
algo/detectors/tof/Hitfind.h
with
10 additions
and
12 deletions
algo/base/compat/OpenMP.h
+
2
−
0
View file @
010dc976
...
...
@@ -45,10 +45,12 @@ namespace cbm::algo::openmp
#ifndef HAVE_OMP
inline
int
GetMaxThreads
()
{
return
1
;
}
inline
int
GetThreadNum
()
{
return
0
;
}
inline
int
GetNumThreads
()
{
return
1
;
}
inline
void
SetNumThreads
(
int
)
{}
#else
inline
int
GetMaxThreads
()
{
return
omp_get_max_threads
();
}
inline
int
GetThreadNum
()
{
return
omp_get_thread_num
();
}
inline
int
GetNumThreads
()
{
return
omp_get_num_threads
();
}
inline
void
SetNumThreads
(
int
n
)
{
omp_set_num_threads
(
n
);
}
#endif
...
...
This diff is collapsed.
Click to expand it.
algo/detectors/tof/Hitfind.cxx
+
5
−
11
View file @
010dc976
...
...
@@ -97,9 +97,9 @@ namespace cbm::algo::tof
}
monitor
.
fSortTime
=
xpu
::
pop_timer
();
std
::
v
ector
<
Hit
>
clustersFlat
;
// cluster storage
std
::
v
ector
<
size_t
>
chanSizes
;
// nClusters per channel
std
::
v
ector
<
u32
>
chanAddresses
;
// channel addresses
PODV
ector
<
Hit
>
clustersFlat
;
// cluster storage
PODV
ector
<
size_t
>
chanSizes
;
// nClusters per channel
PODV
ector
<
u32
>
chanAddresses
;
// channel addresses
// Prefix arrays for parallelization
std
::
vector
<
size_t
>
cluPrefix
;
...
...
@@ -111,14 +111,8 @@ namespace cbm::algo::tof
xpu
::
t_add_bytes
(
digiIn
.
size_bytes
());
#pragma omp parallel
{
#ifdef _OPENMP
int
ithread
=
omp_get_thread_num
();
int
nthreads
=
omp_get_num_threads
();
#else
int
ithread
=
0
;
int
nthreads
=
1
;
#endif
const
int
ithread
=
openmp
::
GetThreadNum
();
const
int
nthreads
=
openmp
::
GetNumThreads
();
#pragma omp single
{
...
...
This diff is collapsed.
Click to expand it.
algo/detectors/tof/Hitfind.h
+
3
−
1
View file @
010dc976
...
...
@@ -17,8 +17,10 @@
#include
<xpu/host.h>
#include
"PODVector.h"
#include
"PartitionedVector.h"
namespace
cbm
::
algo
::
tof
{
...
...
@@ -52,7 +54,7 @@ namespace cbm::algo::tof
class
Hitfind
{
public:
typedef
std
::
tuple
<
PartitionedVector
<
Hit
>
,
HitfindMonitorData
,
std
::
v
ector
<
i32
>>
resultType
;
typedef
std
::
tuple
<
PartitionedVector
<
Hit
>
,
HitfindMonitorData
,
PODV
ector
<
i32
>>
resultType
;
/** @brief Algorithm execution
** @param fles timeslice to hitfind
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment