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$ |
20 |
|
#include "pmapdiag.h" |
21 |
|
#include "rcontrib.h" |
22 |
|
#include "otypes.h" |
23 |
– |
#include <signal.h> |
23 |
|
|
24 |
|
|
25 |
|
|
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; |
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 |
|
} |
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) |