aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/utility
diff options
context:
space:
mode:
Diffstat (limited to 'include/armnn/utility')
-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