PxGpuTask.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 
12 #ifndef PX_GPU_TASK_H
13 #define PX_GPU_TASK_H
14 
15 #include "pxtask/PxTask.h"
16 #include "pxtask/PxGpuDispatcher.h"
17 
18 #ifndef PX_DOXYGEN
19 namespace physx
20 {
21 #endif
22 
24 
36 {
38  enum Enum
39  {
43 
44  NUM_GPU_TASK_HINTS
45  };
46 };
47 
51 class PxGpuTask : public PxTask
52 {
53 public:
54  PxGpuTask() : mComp(NULL) {}
55 
67  virtual bool launchInstance(CUstream stream, int kernelIndex) = 0;
68 
72  virtual PxGpuTaskHint::Enum getTaskHint() const = 0;
73 
78  void setCompletionTask(PxBaseTask& task)
79  {
80  mComp = &task;
81  }
82 
83  void release()
84  {
85  if (mComp)
86  {
87  mComp->removeReference();
88  mComp = NULL;
89  }
91  }
92 
93 protected:
96 };
97 
99 
100 #ifndef PX_DOXYGEN
101 } // end physx namespace
102 #endif
103 
104 #endif


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