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
140
141
142
143
144
|
<html>
<head>
<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxTaskManager.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="images/PhysXlogo.png" align="middle"> <br>
<center>
<a class="qindex" href="main.html">Main Page</a>
<a class="qindex" href="hierarchy.html">Class Hierarchy</a>
<a class="qindex" href="annotated.html">Compound List</a>
<a class="qindex" href="functions.html">Compound Members</a>
</center>
<hr class="second">
</div>
<!-- Generated by Doxygen 1.5.8 -->
<h1>PxTaskManager.h</h1><a href="PxTaskManager_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) 2008-2017 NVIDIA Corporation. All rights reserved.</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef PXTASK_PXTASKMANAGER_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define PXTASK_PXTASKMANAGER_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="PxTaskDefine_8h.html">task/PxTaskDefine.h</a>"</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="PxSimpleTypes_8h.html">foundation/PxSimpleTypes.h</a>"</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="PxErrorCallback_8h.html">foundation/PxErrorCallback.h</a>"</span>
<a name="l00034"></a>00034
<a name="l00035"></a>00035 <span class="keyword">namespace </span>physx
<a name="l00036"></a>00036 {
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <a class="code" href="group__foundation.html#g1145ffab2cc9a77ca65b59ba4126342f">PX_PUSH_PACK_DEFAULT</a>
<a name="l00039"></a>00039
<a name="l00040"></a>00040 <span class="keyword">class </span>PxBaseTask;
<a name="l00041"></a>00041 <span class="keyword">class </span>PxTask;
<a name="l00042"></a><a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">00042</a> <span class="keyword">class </span><a class="code" href="classphysx_1_1PxLightCpuTask.html" title="A PxBaseTask implementation with immediate execution and simple dependencies.">PxLightCpuTask</a>;
<a name="l00043"></a>00043 <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a>;
<a name="l00044"></a>00044
<a name="l00053"></a><a class="code" href="structphysx_1_1PxTaskType.html">00053</a> <span class="keyword">struct </span><a class="code" href="structphysx_1_1PxTaskType.html" title="Identifies the type of each heavyweight PxTask object.">PxTaskType</a>
<a name="l00054"></a>00054 {
<a name="l00058"></a><a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b">00058</a> <span class="keyword">enum</span> <a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b" title="Identifies the type of each heavyweight PxTask object.">Enum</a>
<a name="l00059"></a>00059 {
<a name="l00060"></a><a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b27553f47b12c277e0cb685240cb8b9b3">00060</a> <a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b27553f47b12c277e0cb685240cb8b9b3" title="PxTask will be run on the CPU.">TT_CPU</a>,
<a name="l00061"></a><a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b4f4e2d64ede267a5b1afcbe74c35c3f7">00061</a> <a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b4f4e2d64ede267a5b1afcbe74c35c3f7" title="PxTask will be run on the GPU.">TT_GPU</a>,
<a name="l00062"></a><a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6bc5b78680f329287a850b9f852c80acd2">00062</a> <a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6bc5b78680f329287a850b9f852c80acd2" title="Return code when attempting to find a task that does not exist.">TT_NOT_PRESENT</a>,
<a name="l00063"></a><a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b25bbc57d255402b6790c14eb8347f4e5">00063</a> <a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b25bbc57d255402b6790c14eb8347f4e5" title="PxTask execution has been completed.">TT_COMPLETED</a>
<a name="l00064"></a>00064 };
<a name="l00065"></a>00065 };
<a name="l00066"></a>00066
<a name="l00067"></a>00067 <span class="keyword">class </span>PxCpuDispatcher;
<a name="l00068"></a>00068 <span class="keyword">class </span>PxGpuDispatcher;
<a name="l00069"></a>00069
<a name="l00083"></a><a class="code" href="classphysx_1_1PxTaskManager.html">00083</a> <span class="keyword">class </span><a class="code" href="classphysx_1_1PxTaskManager.html" title="The PxTaskManager interface.">PxTaskManager</a>
<a name="l00084"></a>00084 {
<a name="l00085"></a>00085 <span class="keyword">public</span>:
<a name="l00086"></a>00086
<a name="l00094"></a>00094 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classphysx_1_1PxTaskManager.html#c391319b63678f793dc6800b5ecda801" title="Set the user-provided dispatcher object for CPU tasks.">setCpuDispatcher</a>(<a class="code" href="classphysx_1_1PxCpuDispatcher.html" title="A CpuDispatcher is responsible for scheduling the execution of tasks passed to it...">PxCpuDispatcher</a>& ref) = 0;
<a name="l00095"></a>00095
<a name="l00103"></a>00103 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classphysx_1_1PxTaskManager.html#2222879a9e1f258c3d46579f56d65275" title="Set the user-provided dispatcher object for GPU tasks.">setGpuDispatcher</a>(<a class="code" href="classphysx_1_1PxGpuDispatcher.html" title="A GpuTask dispatcher.">PxGpuDispatcher</a>& ref) = 0;
<a name="l00104"></a>00104
<a name="l00112"></a>00112 <span class="keyword">virtual</span> <a class="code" href="classphysx_1_1PxCpuDispatcher.html" title="A CpuDispatcher is responsible for scheduling the execution of tasks passed to it...">PxCpuDispatcher</a>* <a class="code" href="classphysx_1_1PxTaskManager.html#4d68c14745bfd85c745b58528b39db26" title="Get the user-provided dispatcher object for CPU tasks.">getCpuDispatcher</a>() <span class="keyword">const</span> = 0;
<a name="l00113"></a>00113
<a name="l00121"></a>00121 <span class="keyword">virtual</span> <a class="code" href="classphysx_1_1PxGpuDispatcher.html" title="A GpuTask dispatcher.">PxGpuDispatcher</a>* <a class="code" href="classphysx_1_1PxTaskManager.html#3b8273fb73c75e7425fd5a0687055641" title="Get the user-provided dispatcher object for GPU tasks.">getGpuDispatcher</a>() <span class="keyword">const</span> = 0;
<a name="l00122"></a>00122
<a name="l00130"></a>00130 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classphysx_1_1PxTaskManager.html#79606deb50e9eb500c5febb44ba1e764" title="Reset any dependencies between Tasks.">resetDependencies</a>() = 0;
<a name="l00131"></a>00131
<a name="l00139"></a>00139 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classphysx_1_1PxTaskManager.html#ab9b613b731eb4cc5007db33fc801017" title="Called by the owning scene to start the task graph.">startSimulation</a>() = 0;
<a name="l00140"></a>00140
<a name="l00146"></a>00146 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classphysx_1_1PxTaskManager.html#6008ca7efcd7fa4a77d10f0606e3f17a" title="Called by the owning scene at the end of a simulation step to synchronize the PxGpuDispatcher...">stopSimulation</a>() = 0;
<a name="l00147"></a>00147
<a name="l00153"></a>00153 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classphysx_1_1PxTaskManager.html#36a746ff81e26d57195ebfdd0141e912" title="Called by the worker threads to inform the PxTaskManager that a task has completed...">taskCompleted</a>(<a class="code" href="classphysx_1_1PxTask.html" title="A PxBaseTask implementation with deferred execution and full dependencies.">PxTask</a>& task) = 0;
<a name="l00154"></a>00154
<a name="l00161"></a>00161 <span class="keyword">virtual</span> <a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a> <a class="code" href="classphysx_1_1PxTaskManager.html#c3b7602900e8f50780d518ab3d0a17d0" title="Retrieve a task by name.">getNamedTask</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* name) = 0;
<a name="l00162"></a>00162
<a name="l00172"></a>00172 <span class="keyword">virtual</span> <a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a> <a class="code" href="classphysx_1_1PxTaskManager.html#f1a81608f80d92d19520aa9dba2dca23" title="Submit a task with a unique name.">submitNamedTask</a>(<a class="code" href="classphysx_1_1PxTask.html" title="A PxBaseTask implementation with deferred execution and full dependencies.">PxTask</a>* task, <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b" title="Identifies the type of each heavyweight PxTask object.">PxTaskType::Enum</a> type = <a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b27553f47b12c277e0cb685240cb8b9b3" title="PxTask will be run on the CPU.">PxTaskType::TT_CPU</a>) = 0;
<a name="l00173"></a>00173
<a name="l00182"></a>00182 <span class="keyword">virtual</span> <a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a> <a class="code" href="classphysx_1_1PxTaskManager.html#2f942d2ad1ea34dd74e7127cd72e20ae" title="Submit an unnamed task.">submitUnnamedTask</a>(<a class="code" href="classphysx_1_1PxTask.html" title="A PxBaseTask implementation with deferred execution and full dependencies.">PxTask</a>& task, <a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b" title="Identifies the type of each heavyweight PxTask object.">PxTaskType::Enum</a> type = <a class="code" href="structphysx_1_1PxTaskType.html#e5545e371cf86793e4a0d395e4ebdb6b27553f47b12c277e0cb685240cb8b9b3" title="PxTask will be run on the CPU.">PxTaskType::TT_CPU</a>) = 0;
<a name="l00183"></a>00183
<a name="l00191"></a>00191 <span class="keyword">virtual</span> <a class="code" href="classphysx_1_1PxTask.html" title="A PxBaseTask implementation with deferred execution and full dependencies.">PxTask</a>* <a class="code" href="classphysx_1_1PxTaskManager.html#62b0f1892459275040db9ce8e274ca14" title="Retrieve a task given a task ID.">getTaskFromID</a>(<a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a> <span class="keywordtype">id</span>) = 0;
<a name="l00192"></a>00192
<a name="l00196"></a>00196 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classphysx_1_1PxTaskManager.html#c368283919f97fdb6918c7f217718db2" title="Release the PxTaskManager object, referenced dispatchers will not be released.">release</a>() = 0;
<a name="l00197"></a>00197
<a name="l00201"></a>00201 <span class="keyword">static</span> <a class="code" href="classphysx_1_1PxTaskManager.html" title="The PxTaskManager interface.">PxTaskManager</a>* <a class="code" href="classphysx_1_1PxTaskManager.html#940fded6abf31baf0dd31b01b2b86c36" title="Construct a new PxTaskManager instance with the given [optional] dispatchers.">createTaskManager</a>(<a class="code" href="classPxErrorCallback.html" title="User defined interface class. Used by the library to emit debug information.">PxErrorCallback</a>& errorCallback, <a class="code" href="classphysx_1_1PxCpuDispatcher.html" title="A CpuDispatcher is responsible for scheduling the execution of tasks passed to it...">PxCpuDispatcher</a>* = 0, <a class="code" href="classphysx_1_1PxGpuDispatcher.html" title="A GpuTask dispatcher.">PxGpuDispatcher</a>* = 0);
<a name="l00202"></a>00202
<a name="l00203"></a>00203 <span class="keyword">protected</span>:
<a name="l00204"></a><a class="code" href="classphysx_1_1PxTaskManager.html#cc2dfad2e3256187f977095071f9be30">00204</a> <span class="keyword">virtual</span> <a class="code" href="classphysx_1_1PxTaskManager.html#cc2dfad2e3256187f977095071f9be30">~PxTaskManager</a>() {}
<a name="l00205"></a>00205
<a name="l00208"></a>00208 <span class="keyword">virtual</span> <span class="keywordtype">void</span> finishBefore(<a class="code" href="classphysx_1_1PxTask.html" title="A PxBaseTask implementation with deferred execution and full dependencies.">PxTask</a>& task, <a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a> taskID) = 0;
<a name="l00209"></a>00209 <span class="keyword">virtual</span> <span class="keywordtype">void</span> startAfter(<a class="code" href="classphysx_1_1PxTask.html" title="A PxBaseTask implementation with deferred execution and full dependencies.">PxTask</a>& task, <a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a> taskID) = 0;
<a name="l00210"></a>00210
<a name="l00211"></a>00211 <span class="keyword">virtual</span> <span class="keywordtype">void</span> addReference(<a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a> taskID) = 0;
<a name="l00212"></a>00212 <span class="keyword">virtual</span> <span class="keywordtype">void</span> decrReference(<a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a> taskID) = 0;
<a name="l00213"></a>00213 <span class="keyword">virtual</span> int32_t getReference(<a class="code" href="namespacephysx.html#7a08e207472f32da1e024056f32d64a2">PxTaskID</a> taskID) <span class="keyword">const</span> = 0;
<a name="l00214"></a>00214
<a name="l00215"></a>00215 <span class="keyword">virtual</span> <span class="keywordtype">void</span> decrReference(<a class="code" href="classphysx_1_1PxLightCpuTask.html" title="A PxBaseTask implementation with immediate execution and simple dependencies.">PxLightCpuTask</a>&) = 0;
<a name="l00216"></a>00216 <span class="keyword">virtual</span> <span class="keywordtype">void</span> addReference(<a class="code" href="classphysx_1_1PxLightCpuTask.html" title="A PxBaseTask implementation with immediate execution and simple dependencies.">PxLightCpuTask</a>&) = 0;
<a name="l00217"></a>00217
<a name="l00218"></a>00218 <span class="keyword">virtual</span> <span class="keywordtype">void</span> emitStartEvent(<a class="code" href="classphysx_1_1PxBaseTask.html" title="Base class of all task types.">PxBaseTask</a>&, uint32_t threadId=0) = 0;
<a name="l00219"></a>00219 <span class="keyword">virtual</span> <span class="keywordtype">void</span> emitStopEvent(<a class="code" href="classphysx_1_1PxBaseTask.html" title="Base class of all task types.">PxBaseTask</a>&, uint32_t threadId=0) = 0;
<a name="l00220"></a>00220
<a name="l00223"></a><a class="code" href="classphysx_1_1PxTaskManager.html#f33eb2b61a29f3a4d62f211a78c46f47">00223</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classphysx_1_1PxBaseTask.html" title="Base class of all task types.">PxBaseTask</a>;
<a name="l00224"></a><a class="code" href="classphysx_1_1PxTaskManager.html#09f24c51c8921a6866cfb6dd214e1282">00224</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classphysx_1_1PxTask.html" title="A PxBaseTask implementation with deferred execution and full dependencies.">PxTask</a>;
<a name="l00225"></a><a class="code" href="classphysx_1_1PxTaskManager.html#4635f476e861159685a7a960660a5842">00225</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classphysx_1_1PxLightCpuTask.html" title="A PxBaseTask implementation with immediate execution and simple dependencies.">PxLightCpuTask</a>;
<a name="l00226"></a><a class="code" href="classphysx_1_1PxTaskManager.html#7f49a59cfb28fd74ba8601e2d0d2d35a">00226</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classphysx_1_1PxTaskManager.html#7f49a59cfb28fd74ba8601e2d0d2d35a">PxGpuWorkerThread</a>;
<a name="l00227"></a>00227 };
<a name="l00228"></a>00228
<a name="l00229"></a>00229 <a class="code" href="group__foundation.html#g9aad3b08e5e15565ff39638b753f4a92">PX_POP_PACK</a>
<a name="l00230"></a>00230
<a name="l00231"></a>00231 } <span class="comment">// end physx namespace</span>
<a name="l00232"></a>00232
<a name="l00233"></a>00233
<a name="l00234"></a>00234 <span class="preprocessor">#endif // PXTASK_PXTASKMANAGER_H</span>
</pre></div></div>
<hr style="width: 100%; height: 2px;"><br>
Copyright © 2008-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>
</body>
</html>
|