| 117 |
|
// Global pointer to simulation manager for trace call-back (only one) |
| 118 |
|
static const RtraceSimulManager * ourRTsimMan = NULL; |
| 119 |
|
|
| 120 |
< |
void // static call-back |
| 120 |
> |
// Call-back for trace output |
| 121 |
> |
void |
| 122 |
|
RtraceSimulManager::RTracer(RAY *r) |
| 123 |
|
{ |
| 124 |
|
(*ourRTsimMan->traceCall)(r, ourRTsimMan->tcData); |
| 238 |
|
if (d > 0) { // direction vector is valid? |
| 239 |
|
if (curFlags & RTlimDist) |
| 240 |
|
res.rmax = d; |
| 241 |
< |
if (curFlags & RTdoFIFO) { |
| 242 |
< |
ray_fifo_in(&res); |
| 241 |
> |
if (((curFlags&RTdoFIFO) != 0) & (ray_pnprocs > 0)) { |
| 242 |
> |
if (ray_fifo_in(&res) < 0) |
| 243 |
> |
return -1; |
| 244 |
|
sendRes = false; |
| 245 |
|
} else |
| 246 |
|
sendRes &= ProcessRay(&res); |
| 259 |
|
int |
| 260 |
|
RtraceSimulManager::FlushQueue() |
| 261 |
|
{ |
| 262 |
< |
if (curFlags & RTdoFIFO) |
| 263 |
< |
return ray_fifo_flush(); |
| 264 |
< |
|
| 262 |
> |
if (curFlags & RTdoFIFO) { |
| 263 |
> |
if (ray_pnprocs) |
| 264 |
> |
return ray_fifo_flush(); |
| 265 |
> |
return 0; |
| 266 |
> |
} |
| 267 |
|
int nsent = 0; |
| 268 |
|
RAY res; |
| 269 |
|
|