Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
smp
default
Functions.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_SMP_DEFAULT_FUNCTIONS_H_
36
#define _BLAZE_MATH_SMP_DEFAULT_FUNCTIONS_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/system/Inline.h
>
44
#include <
blaze/system/SMP.h
>
45
#include <
blaze/util/MaybeUnused.h
>
46
#include <
blaze/util/StaticAssert.h
>
47
#include <
blaze/util/Types.h
>
48
49
50
namespace
blaze {
51
52
//=================================================================================================
53
//
54
// SMP UTILITY FUNCTIONS
55
//
56
//=================================================================================================
57
58
//*************************************************************************************************
61
BLAZE_ALWAYS_INLINE
size_t
getNumThreads
();
62
BLAZE_ALWAYS_INLINE
void
setNumThreads
(
size_t
number );
63
BLAZE_ALWAYS_INLINE
void
shutDownThreads
();
65
//*************************************************************************************************
66
67
68
//*************************************************************************************************
77
BLAZE_ALWAYS_INLINE
size_t
getNumThreads
()
78
{
79
return
1UL;
80
}
81
//*************************************************************************************************
82
83
84
//*************************************************************************************************
97
BLAZE_ALWAYS_INLINE
void
setNumThreads
(
size_t
number )
98
{
99
MAYBE_UNUSED
( number );
100
}
101
//*************************************************************************************************
102
103
104
//*************************************************************************************************
128
BLAZE_ALWAYS_INLINE
void
shutDownThreads
()
129
{}
130
//*************************************************************************************************
131
132
133
134
135
//=================================================================================================
136
//
137
// COMPILE TIME CONSTRAINT
138
//
139
//=================================================================================================
140
141
//*************************************************************************************************
143
namespace
{
144
145
BLAZE_STATIC_ASSERT
( !
BLAZE_HPX_PARALLEL_MODE
);
146
BLAZE_STATIC_ASSERT
( !
BLAZE_CPP_THREADS_PARALLEL_MODE
);
147
BLAZE_STATIC_ASSERT
( !
BLAZE_BOOST_THREADS_PARALLEL_MODE
);
148
BLAZE_STATIC_ASSERT
( !
BLAZE_OPENMP_PARALLEL_MODE
);
149
150
}
152
//*************************************************************************************************
153
154
}
// namespace blaze
155
156
#endif
MaybeUnused.h
Header file for the MAYBE_UNUSED function template.
StaticAssert.h
Compile time assertion.
blaze::getNumThreads
BLAZE_ALWAYS_INLINE size_t getNumThreads()
Returns the number of threads used for thread parallel operations.
Definition
Functions.h:77
blaze::setNumThreads
BLAZE_ALWAYS_INLINE void setNumThreads(size_t number)
Sets the number of threads to be used for thread parallel operations.
Definition
Functions.h:97
blaze::shutDownThreads
BLAZE_ALWAYS_INLINE void shutDownThreads()
Provides a reliable shutdown of C++11 threads for Visual Studio compilers.
Definition
Functions.h:128
BLAZE_STATIC_ASSERT
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition
StaticAssert.h:112
BLAZE_ALWAYS_INLINE
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition
Inline.h:85
BLAZE_CPP_THREADS_PARALLEL_MODE
#define BLAZE_CPP_THREADS_PARALLEL_MODE
Compilation switch for the C++11 parallelization.
Definition
SMP.h:124
BLAZE_HPX_PARALLEL_MODE
#define BLAZE_HPX_PARALLEL_MODE
Compilation switch for the HPX parallelization.
Definition
SMP.h:96
BLAZE_OPENMP_PARALLEL_MODE
#define BLAZE_OPENMP_PARALLEL_MODE
Compilation switch for the OpenMP parallelization.
Definition
SMP.h:68
BLAZE_BOOST_THREADS_PARALLEL_MODE
#define BLAZE_BOOST_THREADS_PARALLEL_MODE
Compilation switch for the Boost parallelization.
Definition
SMP.h:152
blaze::MAYBE_UNUSED
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition
MaybeUnused.h:81
Inline.h
System settings for the inline keywords.
SMP.h
System settings for the shared-memory parallelization.
Types.h
Header file for basic type definitions.
Generated by
1.18.0