diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | include/armnn/utility/Assert.hpp | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b85030ac5a..2f8761aa94 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -247,6 +247,7 @@ list(APPEND armnn_sources include/armnn/Version.hpp include/armnn/profiling/IProfilingGuidGenerator.hpp include/armnn/profiling/ISendTimelinePacket.hpp + include/armnn/utility/Assert.hpp include/armnn/utility/IgnoreUnused.hpp profiling/common/include/SocketConnectionException.hpp src/armnn/layers/LayerCloneBase.hpp diff --git a/include/armnn/utility/Assert.hpp b/include/armnn/utility/Assert.hpp new file mode 100644 index 0000000000..4d2f47b90b --- /dev/null +++ b/include/armnn/utility/Assert.hpp @@ -0,0 +1,21 @@ +// +// Copyright © 2020 Arm Ltd. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include <cassert> + +namespace armnn +{ + +#ifndef NDEBUG +# define ARMNN_ASSERT(COND) assert(COND) +# define ARMNN_ASSERT_MSG(COND, MSG) assert(COND && MSG) +#else +# define ARMNN_ASSERT(COND) +# define ARMNN_ASSERT_MSG(COND, MSG) +#endif + +} //namespace armnn
\ No newline at end of file |