Math API nvidia_logo_transpbg.gif Up
assert.h
Go to the documentation of this file.
1/***************************************************************************************************
2 * Copyright 2024 NVIDIA Corporation. All rights reserved.
3 **************************************************************************************************/
8
9#ifndef MI_MATH_ASSERT_H
10#define MI_MATH_ASSERT_H
11
12#include <mi/base/config.h>
13#include <mi/base/assert.h>
14
15namespace mi {
16
17namespace math {
18
42#if defined( mi_math_assert) && ! defined( mi_math_assert_msg) \
43 || ! defined( mi_math_assert) && defined( mi_math_assert_msg)
44error "Only one of mi_math_assert and mi_math_assert_msg has been defined. Please define both."
45#else
46#ifndef mi_math_assert
47
61#define mi_math_assert(expr) mi_base_assert(expr)
62
80#define mi_math_assert_msg(expr, msg) mi_base_assert_msg(expr, msg)
81
82// Just for doxygen, begin
83
89#define mi_math_assert_enabled
90#undef mi_math_assert_enabled
91
92// Just for doxygen, end
93
94#ifdef mi_base_assert_enabled
95#define mi_math_assert_enabled
96#endif // mi_math_assert_enabled
97
98#else // mi_math_assert
99
100#define mi_math_assert_enabled
101
102#endif // mi_math_assert
103#endif // mi_math_assert xor mi_math_assert_msg
104
105 // end group mi_math_assert
107
108} // namespace math
109
110} // namespace mi
111
112#endif // MI_MATH_ASSERT_H
Assertions and compile-time assertions.
Configuration of the Base API.
std::basic_ostream<C, T> & error(std::basic_ostream<C, T> &ostream)
Manipulator for mi::base::Log_stream.
Definition: ilogger.h:542
Common namespace for APIs of NVIDIA Advanced Rendering Center GmbH.
Definition: math.h:22