190 |
|
if (castonly || every_out[0] != NULL) |
191 |
|
nproc = 1; /* don't bother multiprocessing */ |
192 |
|
else if (nproc <= 0) // need to get default for system? |
193 |
< |
nproc = myRTmanager.SetThreadCount(); |
194 |
< |
if (ray_out[0]) |
195 |
< |
myRTmanager.SetCookedCall(printvals); |
196 |
< |
if (every_out[0]) |
197 |
< |
myRTmanager.SetTraceCall(ourtrace); |
193 |
> |
nproc = myRTmanager.GetNCores(); |
194 |
|
if ((flushIntvl > 0) & (nproc > flushIntvl)) { |
195 |
|
error(WARNING, "reducing number of processes to match flush interval"); |
196 |
|
nproc = flushIntvl; |
197 |
|
} |
198 |
|
nproc = myRTmanager.SetThreadCount(nproc); |
199 |
+ |
if (ray_out[0]) |
200 |
+ |
myRTmanager.SetCookedCall(printvals); |
201 |
+ |
if (every_out[0]) |
202 |
+ |
myRTmanager.SetTraceCall(ourtrace); |
203 |
|
myRTmanager.rtFlags |= RTdoFIFO; |
204 |
|
if (hresolu > 0) { // print resolution string if appropriate |
205 |
|
if (vresolu > 0) |
214 |
|
error(WARNING, "extra ray(s) past end of input"); |
215 |
|
n = vcount; |
216 |
|
} // put ray(s) into queue |
217 |
< |
if (myRTmanager.EnqueueBundle(ivbuf, n) < 0) |
217 |
> |
if (myRTmanager.EnqueueBundle(ivbuf, n) < n) |
218 |
|
error(USER, "ray queuing failure"); |
219 |
|
pending |= (n > 1); // time to flush output? |
220 |
|
bool atZero = IsZeroVec(ivbuf[2*n-1]); |