aboutsummaryrefslogtreecommitdiff
path: root/docs/api_docs/files/pageglobalsapi.html
blob: d36258feab9f3bcc6ffb9dd8514d45f73f195ef1 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<html>
	<head>
		<title>NVIDIA(R) Blast(R) SDK 1.1 API Reference: Globals API (NvBlastGlobals)</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.5.8 -->
<div class="contents">
<h1><a class="anchor" name="pageglobalsapi">Globals API (NvBlastGlobals) </a></h1>The NvBlastGlobals library is a utility library which is used by NvBlastTk (see <a class="el" href="pagehlapi.html">High Level (Toolkit) API (NvBlastTk)</a>) and some extensions (see <a class="el" href="pageextapi.html">Extensions (NvBlastExt)</a>) and samples.<p>
It provides a global allocator, error callback, and profiler API.<p>
<br>
 <h2><a class="anchor" name="globalsallocator">
Allocator</a></h2>
<b>Include <a class="el" href="_nv_blast_globals_8h.html">NvBlastGlobals.h</a></b> <br>
<p>
A global allocator with interface<p>
<div class="fragment"><pre class="fragment"><a class="code" href="class_nv_1_1_blast_1_1_allocator_callback.html" title="Abstract base class for an application defined memory allocator that can be used...">Nv::Blast::AllocatorCallback</a>
</pre></div><p>
may be set by the user with the function<p>
<div class="fragment"><pre class="fragment"><a class="code" href="_nv_blast_globals_8h.html#593586b9c9276aecb5a8f552f526f73b">NvBlastGlobalSetAllocatorCallback</a>
</pre></div><p>
and accessed using<p>
<div class="fragment"><pre class="fragment"><a class="code" href="_nv_blast_globals_8h.html#6960a904cca030a87f4a569d0cd6a4fa">NvBlastGlobalGetAllocatorCallback</a>
</pre></div><p>
An internal, default allocator is used if the user does not set their own, or if NULL is passed into NvBlastGlobalSetAllocatorCallback.<p>
This allocator is used by NvBlastTk, as well as any extension that allocates memory. In addition, utility macros are provided such as <b>NVBLAST_ALLOC</b>, <b>NVBLAST_FREE</b>, <b>NVBLAST_NEW</b>, and <b>NVBLAST_DELETE</b>.<p>
<br>
 <h2><a class="anchor" name="globalserror">
Error Callback</a></h2>
<b>Include <a class="el" href="_nv_blast_globals_8h.html">NvBlastGlobals.h</a></b><p>
A global error message callback with interface<p>
<div class="fragment"><pre class="fragment"><a class="code" href="class_nv_1_1_blast_1_1_error_callback.html" title="User defined interface class. Used by the library to emit debug information.">Nv::Blast::ErrorCallback</a>
</pre></div><p>
may be set by the user with the function<p>
<div class="fragment"><pre class="fragment"><a class="code" href="_nv_blast_globals_8h.html#67996f009abbedc2d6c769f4af11f95f">NvBlastGlobalSetErrorCallback</a>
</pre></div><p>
and accessed using<p>
<div class="fragment"><pre class="fragment"><a class="code" href="_nv_blast_globals_8h.html#dfce9f2ac7e3acfdd5c82cdbc9db0f36">NvBlastGlobalGetErrorCallback</a>
</pre></div><p>
An internal, default error callback is used if the user does not set their own, or if NULL is passed into NvBlastGlobalSetErrorCallback.<p>
This error callback is used by NvBlastTk, as well as many extensions. In addition, utility macros are provided such as <b>NVBLAST_LOG_ERROR</b> and <b>NVBLAST_LOG_WARNING</b>.<p>
Finally, a function with signature given by NvBlastLog is provided which uses the global error callback,<p>
<div class="fragment"><pre class="fragment"><a class="code" href="namespace_nv_1_1_blast.html#1152c58af94417b6861e5bb3695b9ddf">Nv::Blast::logLL</a>
</pre></div><p>
This function may be passed into any NvBlast&trade; function's log parameter.<p>
<br>
 <h2><a class="anchor" name="globalsprofiler">
Profiler API</a></h2>
<b>Include <a class="el" href="_nv_blast_profiler_8h.html">NvBlastProfiler.h</a></b> <br>
<p>
BlastTk contains many profiling zones which use the global profiler which can be accessed in this library. The user may implement the interface<p>
<div class="fragment"><pre class="fragment"><a class="code" href="class_nv_1_1_blast_1_1_profiler_callback.html">Nv::Blast::ProfilerCallback</a>
</pre></div><p>
and pass it to the globals library using<p>
<div class="fragment"><pre class="fragment"><a class="code" href="_nv_blast_profiler_8h.html#fba345e0f5a9689ded425622ea9a659b">NvBlastProfilerSetCallback</a>
</pre></div><p>
A NULL pointer may be passed in, disabling profiling. Profiler features are only active in checked, debug and profile builds.<p>
The granularity of events reported can be selected with<p>
<div class="fragment"><pre class="fragment"><a class="code" href="_nv_blast_profiler_8h.html#13f57e40a8f414e4004336f0ed82c540">NvBlastProfilerSetDetail</a>
</pre></div><p>
<br>
 </div>
<!-- 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>