OpenShot Library | libopenshot
0.4.0
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
o
p
q
r
s
t
v
w
Functions
Variables
Typedefs
Enumerations
Enumerator
a
b
c
e
f
g
h
l
m
p
r
s
t
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Related Functions
Files
File List
File Members
All
_
a
c
e
f
h
i
k
m
n
o
p
q
r
s
t
u
Functions
Variables
Typedefs
Macros
_
a
e
f
h
i
k
m
n
o
p
q
r
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
OpenMPUtilities.h
Go to the documentation of this file.
1
9
// Copyright (c) 2008-2019 OpenShot Studios, LLC
10
//
11
// SPDX-License-Identifier: LGPL-3.0-or-later
12
13
#ifndef OPENSHOT_OPENMP_UTILITIES_H
14
#define OPENSHOT_OPENMP_UTILITIES_H
15
16
#include <omp.h>
17
#include <algorithm>
18
#include <string>
19
20
#include "
Settings.h
"
21
22
// Calculate the # of OpenMP Threads to allow
23
#define OPEN_MP_NUM_PROCESSORS (std::min(omp_get_num_procs(), std::max(2, openshot::Settings::Instance()->OMP_THREADS) ))
24
#define FF_NUM_PROCESSORS (std::min(omp_get_num_procs(), std::max(2, openshot::Settings::Instance()->FF_THREADS) ))
25
26
// Set max-active-levels to the max supported, if possible
27
// (supported_active_levels is OpenMP 5.0 (November 2018) or later, only.)
28
#if (_OPENMP >= 201811)
29
#define OPEN_MP_MAX_ACTIVE omp_get_supported_active_levels()
30
#else
31
#define OPEN_MP_MAX_ACTIVE OPEN_MP_NUM_PROCESSORS
32
#endif
33
34
#endif
Settings.h
Header file for global Settings class.
Generated by
1.8.17