By default, the number of jobs is the number of cores plus one.
[COMPILER] * NEW: By default, the number of jobs is the number of cores plus one. * NEW: -j0 option means the number of cores plus one.
This commit is contained in:
parent
6c76170f51
commit
84c5ac08dd
1 changed files with 4 additions and 3 deletions
|
@ -240,7 +240,7 @@ static void get_arguments(int argc, char **argv)
|
|||
|
||||
case 'j':
|
||||
_ntask_max = atoi(optarg);
|
||||
if (_ntask_max < 1 || _ntask_max > 32)
|
||||
if (_ntask_max < 0 || _ntask_max > 16)
|
||||
ERROR_fail("Incorrect number of jobs.");
|
||||
break;
|
||||
|
||||
|
@ -746,10 +746,11 @@ int main(int argc, char **argv)
|
|||
|
||||
TRY
|
||||
{
|
||||
_ntask_max = SYSTEM_get_cpu_count();
|
||||
|
||||
get_arguments(argc, argv);
|
||||
|
||||
if (_ntask_max == 0)
|
||||
_ntask_max = SYSTEM_get_cpu_count() + 1;
|
||||
|
||||
if (_ntask_max >= 2)
|
||||
{
|
||||
if (setpgid(0, 0))
|
||||
|
|
Loading…
Reference in a new issue