PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
Namespaces | Macros | Functions
assert.hpp File Reference

Implements a custom assert macro PLSSVM_ASSERT. More...

#include "plssvm/exceptions/source_location.hpp"
#include "fmt/color.h"
#include "fmt/core.h"
#include <cstdlib>
#include <iostream>
#include <string_view>
#include <utility>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 plssvm
 The main namespace containing all public API functions.
 
 plssvm::detail
 Namespace containing implementation details. Should not directly be used by users.
 

Macros

#define PLSSVM_ASSERT_ENABLED
 Defines the PLSSVM_ASSERT_ENABLED if PLSSVM_ENABLE_ASSERTS is defined and NDEBUG is not defined (in DEBUG mode).
 
#define PLSSVM_ASSERT(cond, msg, ...)   plssvm::detail::check_assertion((cond), (#cond), plssvm::source_location::current(), (msg), ##__VA_ARGS__)
 Defines the PLSSVM_ASSERT macro if PLSSVM_ASSERT_ENABLED is defined.
 

Functions

template<typename... Args>
void plssvm::detail::check_assertion (const bool cond, const std::string_view cond_str, const source_location &loc, const std::string_view msg, Args &&...args)
 Function called by the PLSSVM_ASSERT macro. Checks the assertion condition. If the condition evaluates to false, prints the assertion condition together with additional information (e.g., plssvm::source_location information) and aborts the program. More...
 

Detailed Description

Implements a custom assert macro PLSSVM_ASSERT.

Author
Alexander Van Craen
Marcel Breyer
License
This file is part of the PLSSVM project which is released under the MIT license. See the LICENSE.md file in the project root for full license information.