PxGpuDispatcher.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008-2015, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 
11 #ifndef PX_GPU_DISPATCHER_H
12 #define PX_GPU_DISPATCHER_H
13 
14 #include "pxtask/PxTask.h"
15 #include "pxtask/PxGpuCopyDesc.h"
16 
17 /* forward decl to avoid including <cuda.h> */
18 typedef struct CUstream_st* CUstream;
19 
20 #ifndef PX_DOXYGEN
21 namespace physx
22 {
23 #endif
24 
26 
28 class PxTaskManager;
29 
55 {
56 public:
63  virtual void startSimulation() = 0;
64 
74  virtual void startGroup() = 0;
75 
83  virtual void submitTask(PxTask& task) = 0;
84 
93  virtual void finishGroup() = 0;
94 
118  virtual void addCompletionPrereq(PxBaseTask& task) = 0;
119 
126  virtual PxCudaContextManager* getCudaContextManager() = 0;
127 
134  virtual void stopSimulation() = 0;
135 
155  virtual bool failureDetected() const = 0;
156 
163  virtual void forceFailureMode() = 0;
164 
171  virtual void* getCurrentProfileBuffer() const = 0;
172 
178  virtual PxU16 registerKernelNames(const char**, PxU16 count) = 0;
179 
199  virtual void launchCopyKernel(PxGpuCopyDesc* desc, PxU32 count, CUstream stream) = 0;
200 
207  virtual PxBaseTask& getPreLaunchTask() = 0;
208 
215  virtual void addPreLaunchDependent(PxBaseTask& dependent) = 0;
216 
223  virtual PxBaseTask& getPostLaunchTask() = 0;
224 
231  virtual void addPostLaunchDependent(PxBaseTask& dependent) = 0;
232 
233 protected:
238  virtual ~PxGpuDispatcher() {}
239 };
240 
242 
243 #ifndef PX_DOXYGEN
244 } // end physx namespace
245 #endif
246 
247 #endif


Copyright © 2008-2015 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com