@@ -58,7 +58,7 @@ class RTPathCPUSampler;
5858class RTPathCPURenderEngine : public PathCPURenderEngine {
5959public:
6060 RTPathCPURenderEngine (RenderConfigRef cfg);
61- virtual ~RTPathCPURenderEngine () = default ;
61+ ~RTPathCPURenderEngine ();
6262
6363 virtual RenderEngineType GetType () const { return GetObjectType (); }
6464 virtual std::string GetTag () const { return GetObjectTag (); }
@@ -80,11 +80,15 @@ class RTPathCPURenderEngine : public PathCPURenderEngine {
8080 friend class RTPathCPURenderThread ;
8181 friend class RTPathCPUSampler ;
8282
83+ struct completion_t {
84+ void operator ()() noexcept { }
85+ };
86+
8387protected:
8488 static luxrays::PropertiesUPtr GetDefaultProps ();
8589
8690 virtual bool IsRTMode () const { return true ; }
87-
91+
8892 CPURenderThreadUPtr NewRenderThread (const u_int index,
8993 luxrays::IntersectionDevice *device) {
9094 return std::make_unique<RTPathCPURenderThread>(this , index, device);
@@ -109,12 +113,10 @@ class RTPathCPURenderEngine : public PathCPURenderEngine {
109113
110114 std::mutex firstFrameMutex;
111115 std::condition_variable firstFrameCondition;
112- std::atomic< u_int> firstFrameThreadDoneCount;
116+ u_int firstFrameThreadDoneCount;
113117 bool firstFrameDone;
114118
115- using CompletionFunction = std::function<void ()>;
116- std::unique_ptr<std::barrier<CompletionFunction>> threadsSyncBarrier; // General sync
117- std::unique_ptr<std::barrier<CompletionFunction>> threadsPauseBarrier; // Dedicated to pause event
119+ std::barrier<completion_t > *threadsSyncBarrier;
118120 std::atomic<bool > threadsPauseMode;
119121};
120122
0 commit comments