aboutsummaryrefslogtreecommitdiff
path: root/docs/source_docs/files/_nv_blast_assert_8h_source.html
blob: 9dfd8d95e45130690c3cb3751c6a0b52f3ade99a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<html>
	<head>
		<title>sdk/common/NvBlastAssert.h Source File</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
		<LINK HREF="NVIDIA.css" REL="stylesheet" TYPE="text/css">
	</head>
	<body bgcolor="#FFFFFF">
		<div id="header">
			<hr class="first">
			<img alt="" src="blast_logo.png">
			<br>
			<center>
				<a class="qindex" href="main.html">Main Page</a> &nbsp; 
				<!-- <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; //-->
				<a class="qindex" href="annotated.html">Class List</a> &nbsp; 
				<a class="qindex" href="functions.html">Class Members</a> &nbsp;  
			</center>
			<hr class="second">
		</div>
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_nv_blast_assert_8h_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">NvBlastAssert.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_nv_blast_assert_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">// This code contains NVIDIA Confidential Information and is disclosed to you</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">// under a form of NVIDIA software license agreement provided separately to you.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">// Notice</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">// NVIDIA Corporation and its licensors retain all intellectual property and</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">// proprietary rights in and to this software and related documentation and</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">// any modifications thereto. Any use, reproduction, disclosure, or</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">// distribution of this software and related documentation without an express</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">// license agreement from NVIDIA Corporation is strictly prohibited.</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED &quot;AS IS.&quot;. NVIDIA MAKES</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">// Information and code furnished is believed to be accurate and reliable.</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">// information or for any infringement of patents or other rights of third parties that may</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">// result from its use. No license is granted by implication or otherwise under any patent</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">// or patent rights of NVIDIA Corporation. Details are subject to change without notice.</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">// This code supersedes and replaces all information previously supplied.</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">// NVIDIA Corporation products are not authorized for use as critical</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">// components in life support devices or systems without express written approval of</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment">// NVIDIA Corporation.</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">// Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifndef NVBLASTASSERT_H</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#define NVBLASTASSERT_H</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_nv_blast_preprocessor_8h.html">NvBlastPreprocessor.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#if !NV_ENABLE_ASSERTS</span></div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="_nv_blast_assert_8h.html#a2b179fca67cdb57b12b65e33fe3f6c93">   37</a></span>&#160;<span class="preprocessor">#define NVBLAST_ASSERT(exp) ((void)0)</span></div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="_nv_blast_assert_8h.html#a4b7b9c0b35d81fc6b5a9ed1e3e02a335">   38</a></span>&#160;<span class="preprocessor">#define NVBLAST_ALWAYS_ASSERT_MESSAGE(message) ((void)0)</span></div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="_nv_blast_assert_8h.html#a4bef80b3f6d110ade867285f8e3acc00">   39</a></span>&#160;<span class="preprocessor">#define NVBLAST_ASSERT_WITH_MESSAGE(condition, message) ((void)0)</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#if NV_VC</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#define NVBLAST_CODE_ANALYSIS_ASSUME(exp)                                                                     \</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">    __analysis_assume(!!(exp)) // This macro will be used to get rid of analysis warning messages if a NVBLAST_ASSERT is used</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment">// to &quot;guard&quot; illegal mem access, for example.</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#define NVBLAST_CODE_ANALYSIS_ASSUME(exp)</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#define NVBLAST_ASSERT(exp)                                                                                   \</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">{                                                                                                             \</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">    static bool _ignore = false;                                                                              \</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">    if (!(exp) &amp;&amp; !_ignore) NvBlastAssertHandler(#exp, __FILE__, __LINE__, _ignore);                          \</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">    NVBLAST_CODE_ANALYSIS_ASSUME(exp);                                                                        \</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">} ((void)0)</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#define NVBLAST_ALWAYS_ASSERT_MESSAGE(message)                                                                    \</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">{                                                                                                             \</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor">    static bool _ignore = false;                                                                              \</span></div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">    if(!_ignore)                                                                                              \</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">    {                                                                                                         \</span></div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor">        NvBlastAssertHandler(message, __FILE__, __LINE__, _ignore);                                               \</span></div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">    }                                                                                                         \</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="preprocessor">} ((void)0)</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">#define NVBLAST_ASSERT_WITH_MESSAGE(exp, message)                                                             \</span></div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">{                                                                                                             \</span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor">    static bool _ignore = false;                                                                              \</span></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor">    if (!(exp) &amp;&amp; !_ignore) NvBlastAssertHandler(message, __FILE__, __LINE__, _ignore);                       \</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="preprocessor">    NVBLAST_CODE_ANALYSIS_ASSUME(exp);                                                                        \</span></div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">} ((void)0)</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="_nv_blast_assert_8h.html#ab1324c0bc11772792474d475d2fef7b2">   70</a></span>&#160;<span class="preprocessor">#define NVBLAST_ALWAYS_ASSERT() NVBLAST_ASSERT(0)</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span></div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;{</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<a class="code" href="_nv_blast_preprocessor_8h.html#ae5c980f1b9848025a2fefa05a9d3bce1">NVBLAST_API</a> <span class="keywordtype">void</span> <a class="code" href="_nv_blast_assert_8h.html#a6982c4d677db17618be039f7890037da">NvBlastAssertHandler</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* expr, <span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">int</span> line, <span class="keywordtype">bool</span>&amp; ignore);</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;} <span class="comment">// extern &quot;C&quot;</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="preprocessor">#endif // #ifndef NVBLASTASSERT_H</span></div><div class="ttc" id="_nv_blast_assert_8h_html_a6982c4d677db17618be039f7890037da"><div class="ttname"><a href="_nv_blast_assert_8h.html#a6982c4d677db17618be039f7890037da">NvBlastAssertHandler</a></div><div class="ttdeci">NVBLAST_API void NvBlastAssertHandler(const char *expr, const char *file, int line, bool &amp;ignore)</div></div>
<div class="ttc" id="_nv_blast_preprocessor_8h_html_ae5c980f1b9848025a2fefa05a9d3bce1"><div class="ttname"><a href="_nv_blast_preprocessor_8h.html#ae5c980f1b9848025a2fefa05a9d3bce1">NVBLAST_API</a></div><div class="ttdeci">#define NVBLAST_API</div><div class="ttdef"><b>Definition:</b> NvBlastPreprocessor.h:37</div></div>
<div class="ttc" id="_nv_blast_preprocessor_8h_html"><div class="ttname"><a href="_nv_blast_preprocessor_8h.html">NvBlastPreprocessor.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div class="footer">
Copyright &copy; 2015-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a>
</div>
</body>
</html>