aboutsummaryrefslogtreecommitdiff
path: root/docs/api_docs/files/_nv_blast_tk_group_8h-source.html
blob: 90cd78477223c0d9f39b964497ff5c878b87a094 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<html>
	<head>
		<title>NVIDIA(R) Blast(R) SDK 1.1 API Reference: sdk/toolkit/include/NvBlastTkGroup.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.5.8 -->
<h1>sdk/toolkit/include/NvBlastTkGroup.h</h1><a href="_nv_blast_tk_group_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This code contains NVIDIA Confidential Information and is disclosed to you</span>
<a name="l00002"></a>00002 <span class="comment">// under a form of NVIDIA software license agreement provided separately to you.</span>
<a name="l00003"></a>00003 <span class="comment">//</span>
<a name="l00004"></a>00004 <span class="comment">// Notice</span>
<a name="l00005"></a>00005 <span class="comment">// NVIDIA Corporation and its licensors retain all intellectual property and</span>
<a name="l00006"></a>00006 <span class="comment">// proprietary rights in and to this software and related documentation and</span>
<a name="l00007"></a>00007 <span class="comment">// any modifications thereto. Any use, reproduction, disclosure, or</span>
<a name="l00008"></a>00008 <span class="comment">// distribution of this software and related documentation without an express</span>
<a name="l00009"></a>00009 <span class="comment">// license agreement from NVIDIA Corporation is strictly prohibited.</span>
<a name="l00010"></a>00010 <span class="comment">//</span>
<a name="l00011"></a>00011 <span class="comment">// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES</span>
<a name="l00012"></a>00012 <span class="comment">// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO</span>
<a name="l00013"></a>00013 <span class="comment">// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,</span>
<a name="l00014"></a>00014 <span class="comment">// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.</span>
<a name="l00015"></a>00015 <span class="comment">//</span>
<a name="l00016"></a>00016 <span class="comment">// Information and code furnished is believed to be accurate and reliable.</span>
<a name="l00017"></a>00017 <span class="comment">// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such</span>
<a name="l00018"></a>00018 <span class="comment">// information or for any infringement of patents or other rights of third parties that may</span>
<a name="l00019"></a>00019 <span class="comment">// result from its use. No license is granted by implication or otherwise under any patent</span>
<a name="l00020"></a>00020 <span class="comment">// or patent rights of NVIDIA Corporation. Details are subject to change without notice.</span>
<a name="l00021"></a>00021 <span class="comment">// This code supersedes and replaces all information previously supplied.</span>
<a name="l00022"></a>00022 <span class="comment">// NVIDIA Corporation products are not authorized for use as critical</span>
<a name="l00023"></a>00023 <span class="comment">// components in life support devices or systems without express written approval of</span>
<a name="l00024"></a>00024 <span class="comment">// NVIDIA Corporation.</span>
<a name="l00025"></a>00025 <span class="comment">//</span>
<a name="l00026"></a>00026 <span class="comment">// Copyright (c) 2016-2020 NVIDIA Corporation. All rights reserved.</span>
<a name="l00027"></a>00027 
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#ifndef NVBLASTTKGROUP_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define NVBLASTTKGROUP_H</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="_nv_blast_tk_identifiable_8h.html">NvBlastTkIdentifiable.h</a>"</span>
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="keyword">namespace </span>Nv
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037 <span class="keyword">namespace </span>Blast
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 
<a name="l00040"></a>00040 <span class="comment">// Forward declarations</span>
<a name="l00041"></a>00041 <span class="keyword">class </span>TkActor;
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 
<a name="l00048"></a><a class="code" href="struct_nv_1_1_blast_1_1_tk_group_desc.html">00048</a> <span class="keyword">struct </span><a class="code" href="struct_nv_1_1_blast_1_1_tk_group_desc.html">TkGroupDesc</a>
<a name="l00049"></a>00049 {
<a name="l00050"></a><a class="code" href="struct_nv_1_1_blast_1_1_tk_group_desc.html#e54fdf33182bd2f481e70c9a05976d48">00050</a>     uint32_t        <a class="code" href="struct_nv_1_1_blast_1_1_tk_group_desc.html#e54fdf33182bd2f481e70c9a05976d48" title="The number of expected TkWorkers to process the TkGroup concurrently.">workerCount</a>;            
<a name="l00051"></a>00051 };
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 
<a name="l00058"></a><a class="code" href="struct_nv_1_1_blast_1_1_tk_group_stats.html">00058</a> <span class="keyword">struct </span><a class="code" href="struct_nv_1_1_blast_1_1_tk_group_stats.html">TkGroupStats</a>
<a name="l00059"></a>00059 {
<a name="l00060"></a><a class="code" href="struct_nv_1_1_blast_1_1_tk_group_stats.html#56d10b130bec08fbebd96fa22c1d9e63">00060</a>     <a class="code" href="struct_nv_blast_timers.html">NvBlastTimers</a>   <a class="code" href="struct_nv_1_1_blast_1_1_tk_group_stats.html#56d10b130bec08fbebd96fa22c1d9e63" title="Accumulated time spent in blast low-level functions, see NvBlastTimers.">timers</a>;                 
<a name="l00061"></a><a class="code" href="struct_nv_1_1_blast_1_1_tk_group_stats.html#6223e0ddf13688cc1abc1aeb1a152fb3">00061</a>     uint32_t        <a class="code" href="struct_nv_1_1_blast_1_1_tk_group_stats.html#6223e0ddf13688cc1abc1aeb1a152fb3" title="Accumulated number of processed actors in all TkWorker.">processedActorsCount</a>;   
<a name="l00062"></a><a class="code" href="struct_nv_1_1_blast_1_1_tk_group_stats.html#52eb102c439a0daefca7f2099a18c2a0">00062</a>     int64_t         <a class="code" href="struct_nv_1_1_blast_1_1_tk_group_stats.html#52eb102c439a0daefca7f2099a18c2a0" title="Accumulated time spent executing TkWorker::run. Unit is ticks, see NvBlastTimers...">workerTime</a>;             
<a name="l00063"></a>00063 };
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 
<a name="l00074"></a><a class="code" href="class_nv_1_1_blast_1_1_tk_group_worker.html">00074</a> <span class="keyword">class </span><a class="code" href="class_nv_1_1_blast_1_1_tk_group_worker.html">TkGroupWorker</a>
<a name="l00075"></a>00075 {
<a name="l00076"></a>00076 <span class="keyword">public</span>:
<a name="l00082"></a>00082     <span class="keyword">virtual</span> <span class="keywordtype">void</span>    <a class="code" href="class_nv_1_1_blast_1_1_tk_group_worker.html#df15d994a12f0c0b18dd0a878b1ddd2f">process</a>(uint32_t jobId) = 0;
<a name="l00083"></a>00083 };
<a name="l00084"></a>00084 
<a name="l00085"></a>00085 
<a name="l00101"></a><a class="code" href="class_nv_1_1_blast_1_1_tk_group.html">00101</a> <span class="keyword">class </span><a class="code" href="class_nv_1_1_blast_1_1_tk_group.html">TkGroup</a> : <span class="keyword">public</span> <a class="code" href="class_nv_1_1_blast_1_1_tk_identifiable.html">TkIdentifiable</a>
<a name="l00102"></a>00102 {
<a name="l00103"></a>00103 <span class="keyword">public</span>:
<a name="l00111"></a>00111     <span class="keyword">virtual</span> <span class="keywordtype">bool</span>            <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#0ef2653e6d605641a65e07634cb0436c">addActor</a>(<a class="code" href="class_nv_1_1_blast_1_1_tk_actor.html">TkActor</a>&amp; actor) = 0;
<a name="l00112"></a>00112 
<a name="l00118"></a>00118     <span class="keyword">virtual</span> uint32_t        <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#0cd433d98578658e1240c7c50fb3c334">getActorCount</a>() <span class="keyword">const</span> = 0;
<a name="l00119"></a>00119 
<a name="l00129"></a>00129     <span class="keyword">virtual</span> uint32_t        <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#c4f6211e8d94b98da0fe9031f1ecec56">getActors</a>(<a class="code" href="class_nv_1_1_blast_1_1_tk_actor.html">TkActor</a>** buffer, uint32_t bufferSize, uint32_t indexStart = 0) <span class="keyword">const</span> = 0;
<a name="l00130"></a>00130 
<a name="l00137"></a>00137     <span class="keyword">virtual</span> uint32_t        <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#e98b1523b3f1323c42129fe88842f306">startProcess</a>() = 0;
<a name="l00138"></a>00138 
<a name="l00149"></a>00149     <span class="keyword">virtual</span> <span class="keywordtype">bool</span>            <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#4d21bd8b0225ae57b81bb8fe09df39ff">endProcess</a>() = 0;
<a name="l00150"></a>00150 
<a name="l00154"></a>00154     <span class="keyword">virtual</span> <span class="keywordtype">void</span>            <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#6a5d3d9dedc6025460c1102b288a1a85">setWorkerCount</a>(uint32_t workerCount) = 0;
<a name="l00155"></a>00155 
<a name="l00159"></a>00159     <span class="keyword">virtual</span> uint32_t        <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#d8f946a317af8760c9f70f9455b1dd6e">getWorkerCount</a>() <span class="keyword">const</span> = 0;
<a name="l00160"></a>00160 
<a name="l00167"></a>00167     <span class="keyword">virtual</span> <a class="code" href="class_nv_1_1_blast_1_1_tk_group_worker.html">TkGroupWorker</a>*  <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#afdf7e869582f414b447edc422b05fb0">acquireWorker</a>() = 0;
<a name="l00168"></a>00168 
<a name="l00174"></a>00174     <span class="keyword">virtual</span> <span class="keywordtype">void</span>            <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#7fc6d691a59aa7b107adfaac6fe5fd65">returnWorker</a>(<a class="code" href="class_nv_1_1_blast_1_1_tk_group_worker.html">TkGroupWorker</a>*) = 0;
<a name="l00175"></a>00175 
<a name="l00179"></a>00179             <span class="keywordtype">void</span>            <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#e207854ae3e30047c6347f9fd3e7a3b9">process</a>();
<a name="l00180"></a>00180 
<a name="l00187"></a>00187     <span class="keyword">virtual</span> <span class="keywordtype">void</span>            <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#dedce0f4d320f3c7f67d1c9c8ebac152">getStats</a>(<a class="code" href="struct_nv_1_1_blast_1_1_tk_group_stats.html">TkGroupStats</a>&amp; stats) <span class="keyword">const</span> = 0;
<a name="l00188"></a>00188 };
<a name="l00189"></a>00189 
<a name="l00190"></a>00190 } <span class="comment">// namespace Blast</span>
<a name="l00191"></a>00191 } <span class="comment">// namespace Nv</span>
<a name="l00192"></a>00192 
<a name="l00193"></a>00193 
<a name="l00194"></a><a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#e207854ae3e30047c6347f9fd3e7a3b9">00194</a> NV_INLINE <span class="keywordtype">void</span> <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#e207854ae3e30047c6347f9fd3e7a3b9">Nv::Blast::TkGroup::process</a>()
<a name="l00195"></a>00195 {
<a name="l00196"></a>00196     uint32_t jobCount = <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#e98b1523b3f1323c42129fe88842f306">startProcess</a>();
<a name="l00197"></a>00197     <span class="keywordflow">if</span> (jobCount &gt; 0)
<a name="l00198"></a>00198     {
<a name="l00199"></a>00199         <a class="code" href="class_nv_1_1_blast_1_1_tk_group_worker.html">TkGroupWorker</a>* worker = <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#afdf7e869582f414b447edc422b05fb0">acquireWorker</a>();
<a name="l00200"></a>00200         <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; jobCount; i++)
<a name="l00201"></a>00201         {
<a name="l00202"></a>00202             worker-&gt;<a class="code" href="class_nv_1_1_blast_1_1_tk_group_worker.html#df15d994a12f0c0b18dd0a878b1ddd2f">process</a>(i);
<a name="l00203"></a>00203         }
<a name="l00204"></a>00204         <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#7fc6d691a59aa7b107adfaac6fe5fd65">returnWorker</a>(worker);
<a name="l00205"></a>00205     }
<a name="l00206"></a>00206     <a class="code" href="class_nv_1_1_blast_1_1_tk_group.html#4d21bd8b0225ae57b81bb8fe09df39ff">endProcess</a>();
<a name="l00207"></a>00207 }
<a name="l00208"></a>00208 
<a name="l00209"></a>00209 
<a name="l00210"></a>00210 <span class="preprocessor">#endif // ifndef NVBLASTTKGROUP_H</span>
</pre></div></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>