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.1 by greg, Tue Feb 24 19:39:26 2015 UTC vs.
Revision 2.4 by rschregle, Fri May 8 13:20:23 2015 UTC

# Line 3 | Line 3
3     Photon map support for light source contributions
4  
5     Roland Schregle (roland.schregle@{hslu.ch, gmail.com})
6 <   (c) Fraunhofer Institute for Solar Energy Systems,
7 <       Lucerne University of Applied Sciences & Arts  
6 >   (c) Lucerne University of Applied Sciences and Arts,
7 >   supported by the Swiss National Science Foundation (SNSF, #147053)
8     ==================================================================
9    
10     $Id$
# Line 20 | Line 20
20   #include "pmapdiag.h"
21   #include "rcontrib.h"
22   #include "otypes.h"
23 #include <signal.h>
23  
24  
25  
# Line 269 | Line 268 | void distribPhotonContrib (PhotonMap* pm)
268  
269     /* Record start time and enable progress report signal handler */
270     repStartTime = time(NULL);
271 <   signal(SIGCONT, pmapDistribReport);
271 >   #ifdef SIGCONT  
272 >      signal(SIGCONT, pmapDistribReport);
273 >   #endif  
274    
275     for (srcIdx = 0; srcIdx < nsources; srcIdx++) {
276        unsigned portCnt = 0, passCnt = 0, prePassCnt = 0;
# Line 438 | Line 439 | void distribPhotonContrib (PhotonMap* pm)
439                       if (photonRepTime > 0 &&
440                           time(NULL) >= repLastTime + photonRepTime)
441                          pmapDistribReport();
442 <                     #ifndef BSD
442 >                     #ifdef SIGCONT
443                          else signal(SIGCONT, pmapDistribReport);
444                       #endif
445                    }
# Line 469 | Line 470 | void distribPhotonContrib (PhotonMap* pm)
470     /* ================================================================
471      * POST-DISTRIBUTION - Set photon flux and build kd-tree, etc.
472      * ================================================================ */
473 <   signal(SIGCONT, SIG_DFL);
473 >   #ifdef SIGCONT    
474 >      signal(SIGCONT, SIG_DFL);
475 >   #endif  
476     free(emap.samples);
477  
478     if (!pm -> heapEnd)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines