PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
exceptions.hpp
Go to the documentation of this file.
1 
12 #ifndef PLSSVM_BACKENDS_SYCL_CSVM_HPP_
13 #define PLSSVM_BACKENDS_SYCL_CSVM_HPP_
14 #pragma once
15 
16 #include "plssvm/exceptions/exceptions.hpp" // plssvm::exception
17 #include "plssvm/exceptions/source_location.hpp" // plssvm::source_location
18 
19 #include <string> // std::string
20 
21 namespace plssvm {
22 
23 namespace sycl {
24 
28 class backend_exception : public exception {
29  public:
35  explicit backend_exception(const std::string &msg, source_location loc = source_location::current());
42  explicit backend_exception(const std::string &msg, std::string_view class_name, source_location loc = source_location::current());
43 };
44 
45 } // namespace sycl
46 
47 namespace hipsycl {
48 
53  public:
59  explicit backend_exception(const std::string &msg, source_location loc = source_location::current());
60 };
61 
62 } // namespace hipsycl
63 
64 namespace dpcpp {
65 
70  public:
76  explicit backend_exception(const std::string &msg, source_location loc = source_location::current());
77 };
78 
79 } // namespace dpcpp
80 
81 } // namespace plssvm
82 
83 #endif // PLSSVM_BACKENDS_SYCL_CSVM_HPP_
backend_exception(const std::string &msg, source_location loc=source_location::current())
Construct a new exception forwarding the exception message and source location to plssvm::sycl::backe...
Base class for all custom exception types. Forwards its message to std::runtime_error and saves the e...
Definition: exceptions.hpp:29
const source_location & loc() const noexcept
Returns the information of the call side where the exception was thrown.
backend_exception(const std::string &msg, source_location loc=source_location::current())
Construct a new exception forwarding the exception message and source location to plssvm::sycl::backe...
The plssvm::source_location class represents certain information about the source code,...
Definition: source_location.hpp:25
static constexpr source_location current(const char *file_name=__builtin_FILE(), const char *function_name=__builtin_FUNCTION(), int line=__builtin_LINE(), int column=0) noexcept
Construct new source location information about the current call side.
Definition: source_location.hpp:35
Exception type thrown if a problem with the SYCL backend occurs.
Definition: exceptions.hpp:28
backend_exception(const std::string &msg, std::string_view class_name, source_location loc=source_location::current())
Construct a new exception forwarding the exception message and source location to plssvm::exception.
backend_exception(const std::string &msg, source_location loc=source_location::current())
Construct a new exception forwarding the exception message and source location to plssvm::exception.
Implements custom exception classes derived from std::runtime_error including source location informa...
The main namespace containing all public API functions.
Definition: backend_types.hpp:24
Implements a custom std::source_location implementation for C++17.