IDS peak IPL v1.17.0
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
34{
35 std::uint32_t major{};
36 std::uint32_t minor{};
37 std::uint32_t subminor{};
38
43 PEAK_IPL_NO_DISCARD std::string ToString() const
44 {
45 return std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(subminor);
46 }
47};
48
52class Library final
53{
54public:
55 Library() = delete;
56 ~Library() = delete;
57
58 Library(const Library&) = delete;
59 Library(Library&&) = delete;
60
61 Library& operator=(const Library&) = delete;
63
74
85
98 static void SetMaxConcurrentThreads(size_t concurrentThreads);
99
110
120 static void SetMultiThreadingEnabled(bool enabled);
121
131 PEAK_IPL_NO_DISCARD static bool SIMDEnabled();
132
144 static void SetSIMDEnabled(bool enabled);
145};
146
148{
149 uint32_t majorVersion{};
150 uint32_t minorVersion{};
151 uint32_t subminorVersion{};
152
155 });
156
159 });
160
163 });
164
165 return Version_t{majorVersion, minorVersion, subminorVersion};
166}
167
169{
170 size_t maxConcurrentThreads = 0;
171
174 &maxConcurrentThreads);
175 });
176
177 return maxConcurrentThreads;
178}
179
180inline void Library::SetMaxConcurrentThreads(size_t concurrentThreads)
181{
184 });
185}
186
188{
189 PEAK_IPL_BOOL8 multiThreadingEnabled{};
190
193 });
194
195 return multiThreadingEnabled != 0;
196}
197
198inline void Library::SetMultiThreadingEnabled(bool enabled)
199{
202 });
203}
204
206{
207 PEAK_IPL_BOOL8 simdEnabled{};
208
211 });
212
213 return simdEnabled != 0;
214}
215
216inline void Library::SetSIMDEnabled(bool enabled)
217{
220 });
221}
222
223} /* namespace ipl */
224} /* namespace peak */
static Version_t Version()
Queries the library version.
Definition peak_ipl_library.hpp:147
Library(const Library &)=delete
static bool MultiThreadingEnabled()
Get if multithreading is enabled in the library.
Definition peak_ipl_library.hpp:187
Library & operator=(Library &&)=delete
static size_t MaxConcurrentThreads()
Queries the maximum number of concurrent threads used by the library.
Definition peak_ipl_library.hpp:168
Library & operator=(const Library &)=delete
static bool SIMDEnabled()
Get if SIMD is enabled in the library.
Definition peak_ipl_library.hpp:205
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:180
static void SetSIMDEnabled(bool enabled)
Disables/Enables SIMD in the library.
Definition peak_ipl_library.hpp:216
static void SetMultiThreadingEnabled(bool enabled)
Disables/Enables multithreading in the library.
Definition peak_ipl_library.hpp:198
The "peak::ipl" namespace contains the whole image processing library.
void ExecuteAndMapReturnCodes(const CallableType &callableObject)
Definition peak_ipl_exception.hpp:271
#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:34
std::uint32_t subminor
Minor.
Definition peak_ipl_library.hpp:37
std::string ToString() const
Subminor.
Definition peak_ipl_library.hpp:43
std::uint32_t major
Definition peak_ipl_library.hpp:35
std::uint32_t minor
Major.
Definition peak_ipl_library.hpp:36