Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
checks.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) Meta Platforms, Inc. and affiliates.
3
*
4
* This source code is licensed under the MIT license found in the
5
* LICENSE file in the root directory of this source tree.
6
*/
7
8
#pragma once
9
15
16
#if defined(MOMENTUM_WITH_XR_LOGGER)
17
18
#include <logging/Checks.h>
19
21
#define MT_CHECK(condition, ...) XR_CHECK(condition, __VA_ARGS__)
22
25
#define MT_CHECK_LT(val1, val2, ...) XR_CHECK_DETAIL_OP1(val1, val2, <, ##__VA_ARGS__)
26
28
#define MT_CHECK_NOTNULL(ptr, ...) XR_CHECK(ptr != nullptr, ##__VA_ARGS__)
29
30
#else
31
32
#include <
momentum/common/exception.h
>
33
36
#define MT_CHECK(condition, ...) MT_THROW_IF(!(condition), ##__VA_ARGS__)
37
41
#define MT_CHECK_LT(val1, val2, ...) MT_THROW_IF(!((val1) < (val2)), ##__VA_ARGS__)
42
45
#define MT_CHECK_NOTNULL(ptr, ...) MT_THROW_IF((ptr) == nullptr, ##__VA_ARGS__)
46
47
#endif
exception.h
common
checks.h
Generated on
for Momentum by
1.15.0