User control over splitting granularity while parallel processing
Georgiy Rakov
georgiy.rakov at oracle.com
Tue Nov 27 08:00:38 PST 2012
Hi Aleksey.
The only useful thing I see is to enable user to specify computational
resources to be excluded while processing pipelines or to assign
particular set of resources to the given pipeline.
I mean something like following:
List<CPU> cores = System.getCPUs();
Stream s1, s2;
....
s1.cpuExclude(cores.get(0)).filter(f).map(m).
....
s2.cpuAssign(cores.get(1), cores.get(2)).filter(f).map(m).
where cpuExclude, cpuAssign return *this*.
And some static methods controlling the default behavior:
class System {
...
public static List<CPU> getDefaultParallelCPUs();
public static List<CPU> setDefaultParallelCPUs(List<CPU> cpus);
//returns prior CPUs
}
Also system properties could be engaged for managing default behavior.
What do you think?
Georgiy.
On 02.11.2012 15:59, Aleksey Shipilev wrote:
> Hi Georgiy,
>
> On 11/02/2012 03:45 PM, Georgiy Rakov wrote:
>> It seems to be useful because the computational complexity of supplied
>> functors (predicates, blocks, ... , etc) is known by nobody but user
>> who's created it.
> Exactly. There is some freedom for automatic optimization though.
>
>> I wonder whether such means are going to be introduced. And if they are
>> not why?
> It is being discussed. If you have the concrete suggestions about the
> API you would see useful, please shoot them here.
>
> -Aleksey.
>
More information about the lambda-dev
mailing list