IDS peak IPL v1.18.0
Loading...
Searching...
No Matches
peak_ipl_library.hpp
Go to the documentation of this file.
1
5
6#pragma once
7
10
11#include <cstddef>
12#include <cstdint>
13
18
19namespace peak
20{
21namespace ipl
22{
23
29{
30 std::uint32_t major{};
31 std::uint32_t minor{};
32
33 union
34 {
38 std::uint32_t patch{};
39
40 PEAK_COMMON_DEPRECATED_MSG("Use patch instead")
44 std::uint32_t subminor;
45 };
46
51 PEAK_IPL_NO_DISCARD std::string ToString() const
52 {
53 return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(patch);
54 }
55};
56
61class Library final
62{
63public:
64 Library() = delete;
65 ~Library() = delete;
66
67 Library(const Library&) = delete;
68 Library(Library&&) = delete;
69
70 Library& operator=(const Library&) = delete;
72
83
94
107 static void SetMaxConcurrentThreads(size_t concurrentThreads);
108
119
129 static void SetMultiThreadingEnabled(bool enabled);
130
140 PEAK_IPL_NO_DISCARD static bool SIMDEnabled();
141
153 static void SetSIMDEnabled(bool enabled);
154};
155
157{
158 Version_t version{};
159
162 });
163
166 });
167
170 });
171
172 return version;
173}
174
176{
177 size_t maxConcurrentThreads = 0;
178
181 &maxConcurrentThreads);
182 });
183
184 return maxConcurrentThreads;
185}
186
187inline void Library::SetMaxConcurrentThreads(size_t concurrentThreads)
188{
191 });
192}
193
195{
196 PEAK_IPL_BOOL8 multiThreadingEnabled{};
197
200 });
201
202 return multiThreadingEnabled != 0;
203}
204
205inline void Library::SetMultiThreadingEnabled(bool enabled)
206{
209 });
210}
211
213{
214 PEAK_IPL_BOOL8 simdEnabled{};
215
218 });
219
220 return simdEnabled != 0;
221}
222
223inline void Library::SetSIMDEnabled(bool enabled)
224{
227 });
228}
229
230} /* namespace ipl */
231} /* namespace peak */
static Version_t Version()
Queries the library version.
Definition peak_ipl_library.hpp:156
Library(const Library &)=delete
static bool MultiThreadingEnabled()
Get if multithreading is enabled in the library.
Definition peak_ipl_library.hpp:194
Library & operator=(Library &&)=delete
static size_t MaxConcurrentThreads()
Queries the maximum number of concurrent threads used by the library.
Definition peak_ipl_library.hpp:175
Library & operator=(const Library &)=delete
static bool SIMDEnabled()
Get if SIMD is enabled in the library.
Definition peak_ipl_library.hpp:212
Library(Library &&)=delete
static void SetMaxConcurrentThreads(size_t concurrentThreads)
Sets the maximum number of concurrent threads used by the library.
Definition peak_ipl_library.hpp:187
static void SetSIMDEnabled(bool enabled)
Disables/Enables SIMD in the library.
Definition peak_ipl_library.hpp:223
static void SetMultiThreadingEnabled(bool enabled)
Disables/Enables multithreading in the library.
Definition peak_ipl_library.hpp:205
The "peak::ipl" namespace contains the whole image processing library.
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition peak_ipl_exception.hpp:284
#define PEAK_COMMON_DEPRECATED_MSG(MESSAGE)
Definition peak_common_defines.h:52
#define PEAK_IPL_NO_DISCARD
Definition peak_ipl_attribute_defines.h:20
PEAK_IPL_C_API PEAK_IPL_Library_SetSIMDEnabled(PEAK_IPL_BOOL8 enabled)
Disables/Enables SIMD in the library.
PEAK_IPL_C_API PEAK_IPL_Library_SetMultiThreadingEnabled(PEAK_IPL_BOOL8 enabled)
Disables/Enables multithreading in the library.
PEAK_IPL_C_API PEAK_IPL_Library_SetMaxConcurrentThreads(size_t concurrentThreads)
Sets the maximum number of concurrent threads used by the library.
PEAK_IPL_C_API PEAK_IPL_Library_GetMultiThreadingEnabled(PEAK_IPL_BOOL8 *enabled)
Disables/Enables multithreading in the library.
PEAK_IPL_C_API PEAK_IPL_Library_GetMaxConcurrentThreads(size_t *concurrentThreads)
Queries the maximum number of concurrent threads used by the library.
PEAK_IPL_C_API PEAK_IPL_Library_GetVersionMinor(uint32_t *libraryVersionMinor)
Queries the library minor version.
int8_t PEAK_IPL_BOOL8
Definition peak_ipl_backend.h:23
PEAK_IPL_C_API PEAK_IPL_Library_GetSIMDEnabled(PEAK_IPL_BOOL8 *enabled)
Disables/Enables SIMD in the library.
PEAK_IPL_C_API PEAK_IPL_Library_GetVersionMajor(uint32_t *libraryVersionMajor)
Queries the library major version.
PEAK_IPL_C_API PEAK_IPL_Library_GetVersionPatch(uint32_t *libraryVersionPatch)
Queries the library patch version.
#define PEAK_IPL_C_ABI_PREFIX
Definition peak_ipl_dll_defines.h:11
Definition peak_ipl_library.hpp:29
std::uint32_t patch
Definition peak_ipl_library.hpp:38
std::uint32_t subminor
Definition peak_ipl_library.hpp:44
std::string ToString() const
Definition peak_ipl_library.hpp:51
std::uint32_t major
Definition peak_ipl_library.hpp:30
std::uint32_t minor
Major.
Definition peak_ipl_library.hpp:31