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

Comparing ray/src/rt/pmapcontrib.c (file contents):
Revision 2.16 by rschregle, Fri Mar 16 21:00:09 2018 UTC vs.
Revision 2.19 by greg, Thu Nov 8 00:54:07 2018 UTC

# Line 23 | Line 23 | static const char RCSid[] = "$Id$";
23   #include "pmapdiag.h"
24   #include "rcontrib.h"
25   #include "otypes.h"
26 + #include "otspecial.h"
27   #if NIX
28     #include <sys/mman.h>
29     #include <sys/wait.h>  
# Line 230 | Line 231 | void distribPhotonContrib (PhotonMap* pm, unsigned num
231     if (!pm -> distribTarget)
232        error(INTERNAL, "no photons to distribute in distribPhotonContrib");
233    
234 <   /* Get photon ports if specified */
235 <   if (ambincl == 1)
235 <      getPhotonPorts();
234 >   /* Get photon ports from modifier list */
235 >   getPhotonPorts(photonPortList);
236        
237     /* Get photon sensor modifiers */
238     getPhotonSensors(photonSensorList);      
# Line 393 | Line 393 | void distribPhotonContrib (PhotonMap* pm, unsigned num
393     }
394   #endif
395          
396 < #if PMAP_SIGUSR
396 > #ifdef PMAP_SIGUSR
397           signal(SIGUSR1, sigUsrDiags);
398   #endif        
399 <        
399 >
400 > #ifdef DEBUG_PMAP          
401           /* Output child process PID after random delay to prevent corrupted
402            * console output due to race condition */
403           usleep(1e6 * pmapRandom(rouletteState));
404 <         fprintf(stderr, "Proc %d: PID = %d\n", proc, getpid());
404 >         fprintf(stderr, "Proc %d: PID = %d "
405 >                 "(waiting 10 sec to attach debugger...)\n",
406 >                 proc, getpid());
407           /* Allow time for debugger to attach to child process */
408           sleep(10);
409 + #endif
410  
411           /* =============================================================
412            * 2-PASS PHOTON DISTRIBUTION
# Line 410 | Line 414 | void distribPhotonContrib (PhotonMap* pm, unsigned num
414            * Pass 2 (main): based on outcome of pass 1, estimate remaining
415            *                number of photons to emit to approximate target
416            *                count
417 <          * ============================================================= */        
417 >          * ============================================================= */
418           for (srcIdx = 0; srcIdx < nsources; srcIdx++) {
419   #ifndef PMAP_SIGUSR        
420              unsigned       portCnt, passCnt = 0, prePassCnt = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines