IDS peak IPL v1.17.2
Loading...
Searching...
No Matches
peak_ipl_library.hpp
Go to the documentation of this file.
1
10
11#pragma once
12
16
17#include <cstddef>
18#include <cstdint>
19
24
25namespace peak
26{
27namespace ipl
28{
29
35{
36 std::uint32_t major{};
37 std::uint32_t minor{};
38 std::uint32_t subminor{};
39
44 PEAK_IPL_NO_DISCARD std::string ToString() const
45 {
46 return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(subminor);
47 }
48};
49
54class Library final
55{
56public:
57 Library() = delete;
58 ~Library() = delete;
59
60 Library(const Library&) = delete;
61 Library(Library&&) = delete;
62
63 Library& operator=(const Library&) = delete;
65
76
87
100 static void SetMaxConcurrentThreads(size_t concurrentThreads);
101
112
122 static void SetMultiThreadingEnabled(bool enabled);
123
133 PEAK_IPL_NO_DISCARD static bool SIMDEnabled();
134
146 static void SetSIMDEnabled(bool enabled);
147};
148
150{
151 uint32_t majorVersion{};
152 uint32_t minorVersion{};
153 uint32_t subminorVersion{};
154
157 });
158
161 });
162
165 });
166
167 return Version_t{majorVersion, minorVersion, subminorVersion};
168}
169
171{
172 size_t maxConcurrentThreads = 0;
173
176 &maxConcurrentThreads);
177 });
178
179 return maxConcurrentThreads;
180}
181
182inline void Library::SetMaxConcurrentThreads(size_t concurrentThreads)
183{
186 });
187}
188
190{
191 PEAK_IPL_BOOL8 multiThreadingEnabled{};
192
195 });
196
197 return multiThreadingEnabled != 0;
198}
199
200inline void Library::SetMultiThreadingEnabled(bool enabled)
201{
204 });
205}
206
208{
209 PEAK_IPL_BOOL8 simdEnabled{};
210
213 });
214
215 return simdEnabled != 0;
216}
217
218inline void Library::SetSIMDEnabled(bool enabled)
219{
222 });
223}
224
225} /* namespace ipl */
226} /* namespace peak */
static Version_t Version()
Queries the library version.
Definition peak_ipl_library.hpp:149
Library(const Library &)=delete
static bool MultiThreadingEnabled()
Get if multithreading is enabled in the library.
Definition peak_ipl_library.hpp:189
Library & operator=(Library &&)=delete
static size_t MaxConcurrentThreads()
Queries the maximum number of concurrent threads used by the library.
Definition peak_ipl_library.hpp:170
Library & operator=(const Library &)=delete
static bool SIMDEnabled()
Get if SIMD is enabled in the library.
Definition peak_ipl_library.hpp:207
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:182
static void SetSIMDEnabled(bool enabled)
Disables/Enables SIMD in the library.
Definition peak_ipl_library.hpp:218
static void SetMultiThreadingEnabled(bool enabled)
Disables/Enables multithreading in the library.
Definition peak_ipl_library.hpp:200
The "peak::ipl" namespace contains the whole image processing library.
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition peak_ipl_exception.hpp:289
#define PEAK_IPL_NO_DISCARD
Definition peak_ipl_attribute_defines.h:25
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_GetVersionSubminor(uint32_t *libraryVersionSubminor)
Queries the library subminor version.
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:26
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.
#define PEAK_IPL_C_ABI_PREFIX
Definition peak_ipl_dll_defines.h:16
Definition peak_ipl_library.hpp:35
std::uint32_t subminor
Minor.
Definition peak_ipl_library.hpp:38
std::string ToString() const
Subminor.
Definition peak_ipl_library.hpp:44
std::uint32_t major
Definition peak_ipl_library.hpp:36
std::uint32_t minor
Major.
Definition peak_ipl_library.hpp:37