aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDerek Lamberti <derek.lamberti@arm.com>2020-02-19 13:25:42 +0000
committerDerek Lamberti <derek.lamberti@arm.com>2020-03-05 09:02:38 +0000
commitdcfc63613054711d58f8bd0d9ea55ccbaf328589 (patch)
tree8a323dab5d88d65fb653572a5972f585fc1df7fb /include
parent9f8cad27f34f31560e55c65451fcd8d4ec2f334e (diff)
downloadarmnn-dcfc63613054711d58f8bd0d9ea55ccbaf328589.tar.gz
IVGCVSW-4485 Introduce ARMNN_ASSERT(_MSG) macros
Change-Id: Iba372f7311a68877a42e52595430db212c5c9fec Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/armnn/utility/Assert.hpp21
1 files changed, 21 insertions, 0 deletions
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