Revision: 62236
http://sourceforge.net/p/brlcad/code/62236
Author: brlcad
Date: 2014-08-19 15:13:52 +0000 (Tue, 19 Aug 2014)
Log Message:
-----------
let ncpu=0 begin to mean something. intent is to mean 'use any and all
available within parent context' which is all cpus/cores if there is no parent
context (which this commit does) or something more intelligent, keeping track
of available slots as threads complete.
Modified Paths:
--------------
brlcad/trunk/src/libbu/parallel.c
Modified: brlcad/trunk/src/libbu/parallel.c
===================================================================
--- brlcad/trunk/src/libbu/parallel.c 2014-08-19 15:09:50 UTC (rev 62235)
+++ brlcad/trunk/src/libbu/parallel.c 2014-08-19 15:13:52 UTC (rev 62236)
@@ -355,6 +355,7 @@
}
}
+
#if defined(_WIN32)
/**
* A separate stub to call parallel_interface_arg that avoids a
@@ -428,6 +429,9 @@
if (ncpu > MAX_PSW) {
bu_log("WARNING: bu_parallel() ncpu(%d) > MAX_PSW(%d), adjusting
ncpu\n", ncpu, MAX_PSW);
ncpu = MAX_PSW;
+ } else if (ncpu < 1) {
+ /* a zero count means use as many as are available. */
+ ncpu = bu_avail_cpus(); /* !!! need something different here */
}
parallel_nthreads_started = 0;
parallel_nthreads_finished = 0;
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits