ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/RtraceSimulManager.h
(Generate patch)

Comparing ray/src/rt/RtraceSimulManager.h (file contents):
Revision 2.3 by greg, Mon Jul 31 23:14:02 2023 UTC vs.
Revision 2.4 by greg, Wed Aug 2 00:04:31 2023 UTC

# Line 22 | Line 22 | typedef void   RayReportCall(RAY *r, void *cd);
22   /// Multi-threaded simulation manager base class
23   class RadSimulManager {
24          int                     nThreads;       // number of active threads
25 + protected:
26 +                                // Assign ray to subthread (fails if NThreads()<2)
27 +        bool                    SplitRay(RAY *r);
28   public:
29                                  RadSimulManager(const char *octn = NULL) {
30                                          LoadOctree(octn);
# Line 46 | Line 49 | class RadSimulManager { (public)
49          bool                    Ready() const {
50                                          return (octname && nsceneobjs > 0);
51                                  }
52 +                                /// Process a ray (in subthread), optional result
53 +        bool                    ProcessRay(RAY *r);
54 +                                /// Wait for next result (or fail)
55 +        bool                    WaitResult(RAY *r);
56                                  /// Close octree, free data, return status
57          int                     Cleanup(bool everything = false);
58   };
# Line 65 | Line 72 | class RtraceSimulManager : public RadSimulManager {
72                                  // Check for changes to render flags, etc.
73          bool                    UpdateMode();
74   protected:
75 +                                // Add a ray result to FIFO, flushing what we can
76 +        int                     QueueResult(const RAY &ra);
77          RNUMBER                 lastRayID;      // last ray ID assigned
78   public:
79          int                     rtFlags;        // operation (RT*) flags
# Line 114 | Line 123 | class RtraceSimulManager : public RadSimulManager {
123                                          return (cookedCall != NULL) | (traceCall != NULL) &&
124                                                  RadSimulManager::Ready();
125                                  }
126 <                                /// Finish pending rays and complete callbacks
127 <        bool                    FlushQueue();
126 >                                /// Finish pending rays and complete callbacks (return #sent)
127 >        int                     FlushQueue();
128                                  /// Close octree, free data, return status
129          int                     Cleanup(bool everything = false) {
130                                          SetCookedCall(NULL);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines