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

Comparing ray/src/rt/RtraceSimulManager.cpp (file contents):
Revision 2.1 by greg, Wed Feb 8 17:41:48 2023 UTC vs.
Revision 2.3 by greg, Mon Jul 31 23:14:02 2023 UTC

# Line 21 | Line 21 | RadSimulManager::LoadOctree(const char *octn)
21          if (octname) {          // already running?
22                  if (octn && !strcmp(octn, octname))
23                          return true;
24 <                Cleanup();
24 >                Cleanup(false);
25          }
26          if (!octn)
27                  return false;
# Line 30 | Line 30 | RadSimulManager::LoadOctree(const char *octn)
30          return true;
31   }
32  
33 + // How many processors are there?
34 + int
35 + RadSimulManager::GetNCores()
36 + {
37 +        return 1;               // XXX temporary
38 + }
39 +
40   // Set number of computation threads (0 => #cores)
41   int
42   RadSimulManager::SetThreadCount(int nt)
# Line 39 | Line 46 | RadSimulManager::SetThreadCount(int nt)
46  
47   // Close octree, free data, return status
48   int
49 < RadSimulManager::Cleanup()
49 > RadSimulManager::Cleanup(bool everything)
50   {
51 <        ray_done(0);
51 >        ray_done(everything);
52          return 0;
53   }
54  
# Line 166 | Line 173 | RtraceSimulManager::EnqueueBundle(const FVECT orig_dir
173                                  res.rmax = d;
174                          samplendx++;
175                          rayvalue(&res);         // XXX single-threaded for now
169                        ++nqueued;
176                  } else if (ThreadsAvailable() < NThreads() &&
177                                  !FlushQueue())
178                          return -1;
179                  if (cookedCall)
180                          (*cookedCall)(&res, ccData);
181 +                nqueued++;
182          }
183          return nqueued;
184   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines