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
Merge requests
!1342
cbmreco: Add option to specify OpenMP threads.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
cbmreco: Add option to specify OpenMP threads.
fweig/cbmroot:algo-omp
into
master
Overview
2
Commits
5
Pipelines
6
Changes
7
Merged
Felix Weiglhofer
requested to merge
fweig/cbmroot:algo-omp
into
master
1 year ago
Overview
2
Commits
5
Pipelines
6
Changes
7
Expand
0
0
Merge request reports
Compare
master
version 5
75c6085f
1 year ago
version 4
3002130a
1 year ago
version 3
d2fca54d
1 year ago
version 2
6a78b998
1 year ago
version 1
e4190c4f
1 year ago
master (base)
and
latest version
latest version
1a173141
5 commits,
1 year ago
version 5
75c6085f
5 commits,
1 year ago
version 4
3002130a
4 commits,
1 year ago
version 3
d2fca54d
3 commits,
1 year ago
version 2
6a78b998
2 commits,
1 year ago
version 1
e4190c4f
1 commit,
1 year ago
7 files
+
66
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
algo/base/compat/OpenMP.h
0 → 100644
+
28
−
0
Options
/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
SPDX-License-Identifier: GPL-3.0-only
Authors: Felix Weiglhofer [committer] */
#ifndef CBM_ALGO_BASE_COMPAT_OPENMP_H
#define CBM_ALGO_BASE_COMPAT_OPENMP_H
#include
"BuildInfo.h"
#ifdef HAVE_OMP
#include
<omp.h>
#endif
namespace
cbm
::
algo
::
openmp
{
#ifndef HAVE_OMP
inline
int
GetMaxThreads
()
{
return
1
;
}
inline
int
GetThreadNum
()
{
return
0
;
}
inline
void
SetNumThreads
(
int
)
{}
#else
inline
int
GetMaxThreads
()
{
return
omp_get_max_threads
();
}
inline
int
GetThreadNum
()
{
return
omp_get_thread_num
();
}
inline
void
SetNumThreads
(
int
n
)
{
omp_set_num_threads
(
n
);
}
#endif
}
// namespace cbm::algo::openmp
#endif // CBM_ALGO_BASE_COMPAT_OPENMP_H
Loading