PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
constants.hpp
Go to the documentation of this file.
1 
12 #ifndef PLSSVM_CONSTANTS_HPP_
13 #define PLSSVM_CONSTANTS_HPP_
14 #pragma once
15 
16 namespace plssvm {
17 
19 using kernel_index_type = int; // TODO: remove and replace by backend specific type?
20 
22 #if defined(PLSSVM_THREAD_BLOCK_SIZE)
23 constexpr kernel_index_type THREAD_BLOCK_SIZE = PLSSVM_THREAD_BLOCK_SIZE;
24 #else
26 #endif
27 
29 #if defined(PLSSVM_INTERNAL_BLOCK_SIZE)
30 constexpr kernel_index_type INTERNAL_BLOCK_SIZE = PLSSVM_INTERNAL_BLOCK_SIZE;
31 #else
33 #endif
34 
36 #if defined(PLSSVM_OPENMP_BLOCK_SIZE)
37 constexpr kernel_index_type OPENMP_BLOCK_SIZE = PLSSVM_OPENMP_BLOCK_SIZE;
38 #else
40 #endif
41 
42 // perform sanity checks
43 static_assert(THREAD_BLOCK_SIZE > 0, "THREAD_BLOCK_SIZE must be greater than 0!");
44 static_assert(INTERNAL_BLOCK_SIZE > 0, "INTERNAL_BLOCK_SIZE must be greater than 0!");
45 static_assert(OPENMP_BLOCK_SIZE > 0, "OPENMP_BLOCK_SIZE must be greater than 0!");
46 
47 } // namespace plssvm
48 
49 #endif // PLSSVM_CONSTANTS_HPP_
The main namespace containing all public API functions.
Definition: backend_types.hpp:24
constexpr kernel_index_type OPENMP_BLOCK_SIZE
Global compile-time constant used for internal caching in the OpenMP kernel. May be changed during th...
Definition: constants.hpp:39
constexpr kernel_index_type THREAD_BLOCK_SIZE
Global compile-time constant used for internal caching. May be changed during the CMake configuration...
Definition: constants.hpp:25
int kernel_index_type
Integer type used inside kernels.
Definition: constants.hpp:19
constexpr kernel_index_type INTERNAL_BLOCK_SIZE
Global compile-time constant used for internal caching. May be changed during the CMake configuration...
Definition: constants.hpp:32