154 |
|
*/ |
155 |
|
|
156 |
|
/// Output channel opening options: new/exclusive, overwrite if exists, or recover data |
157 |
< |
enum RCOutputOp {RCOnew, RCOforce, RCOrecover}; |
157 |
> |
enum RCOutputOp {RCOnew=0, RCOforce, RCOrecover}; |
158 |
|
|
159 |
|
/// Converts above to RdataShare open flags (may be adjusted by calling program) |
160 |
|
extern int RSDOflags[]; |
279 |
|
int PrepOutput(); |
280 |
|
/// Are we ready to compute some records? |
281 |
|
bool Ready() const { |
282 |
< |
return rowsDone.Length(); |
282 |
> |
return (rowsDone.Length() > 0) & (accum > 0); |
283 |
|
} |
284 |
|
/// Set number of computation threads (0 => #cores) |
285 |
|
int SetThreadCount(int nt = 0); |
317 |
|
} |
318 |
|
/// Close octree, free data, return status |
319 |
|
int Cleanup(bool everything = false) { |
320 |
+ |
if (nkids < 0) return 0; // skip 4 child |
321 |
|
if (rowsDone.Length()) { |
322 |
|
SetThreadCount(1); |
323 |
|
cow_doneshare(); |