| 44 |
|
/// Add a line to header (adds newline if none) |
| 45 |
|
bool AddHeader(const char *str); |
| 46 |
|
/// Append program line to header |
| 47 |
< |
bool AddHeader(int ac, const char *av[]); |
| 48 |
< |
/// Get header lines if any |
| 49 |
< |
const char * GetHeader() const { |
| 50 |
< |
return header; |
| 47 |
> |
bool AddHeader(int ac, char *av[]); |
| 48 |
> |
/// Get header lines or empty string |
| 49 |
> |
const char * GetHeadStr() const { |
| 50 |
> |
return hlen ? header : ""; |
| 51 |
|
} |
| 52 |
+ |
/// Look for specific header keyword, return value |
| 53 |
+ |
const char * GetHeadStr(const char *key, bool inOK = false) const; |
| 54 |
|
/// How many cores are available? |
| 55 |
|
static int GetNCores(); |
| 56 |
|
/// Set number of computation threads (0 => #cores) |
| 107 |
|
int SetThreadCount(int nt = 0) { |
| 108 |
|
if (nt <= 0) nt = castonly ? 1 : GetNCores(); |
| 109 |
|
if (nt == NThreads()) return nt; |
| 110 |
< |
if (FlushQueue() < 0) return 0; |
| 110 |
> |
if (nt < NThreads() && FlushQueue() < 0) return 0; |
| 111 |
|
return RadSimulManager::SetThreadCount(nt); |
| 112 |
|
} |
| 113 |
|
/// Add ray bundle to queue w/ optional 1st ray ID |