PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
target_platforms.hpp
Go to the documentation of this file.
1 
13 #ifndef PLSSVM_TARGET_PLATFORMS_HPP_
14 #define PLSSVM_TARGET_PLATFORMS_HPP_
15 #pragma once
16 
17 #include <iosfwd> // forward declare std::ostream and std::istream
18 #include <vector> // std::vector
19 
20 namespace plssvm {
21 
25 enum class target_platform {
27  automatic,
29  cpu,
31  gpu_nvidia,
33  gpu_amd,
35  gpu_intel
36 };
37 
43 [[nodiscard]] std::vector<target_platform> list_available_target_platforms();
44 
51 [[nodiscard]] target_platform determine_default_target_platform(const std::vector<target_platform> &platform_device_list = list_available_target_platforms());
52 
59 std::ostream &operator<<(std::ostream &out, target_platform target);
60 
67 std::istream &operator>>(std::istream &in, target_platform &target);
68 
69 } // namespace plssvm
70 
71 #endif // PLSSVM_TARGET_PLATFORMS_HPP_
The main namespace containing all public API functions.
Definition: backend_types.hpp:24
target_platform determine_default_target_platform(const std::vector< target_platform > &platform_device_list=list_available_target_platforms())
Return the default target platform given the available devices in platform_device_list.
target_platform
Enum class for all possible targets.
Definition: target_platforms.hpp:25
std::istream & operator>>(std::istream &in, backend_type &backend)
Use the input-stream in to initialize the backend type.
std::ostream & operator<<(std::ostream &out, backend_type backend)
Output the backend to the given output-stream out.
std::vector< target_platform > list_available_target_platforms()
Return a list of all currently available target platforms.