[gpars-dev] Dataflow operators, I am missing something…

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[gpars-dev] Dataflow operators, I am missing something…

Russel Winder-2
Context is GPars dataflow operators. I have code which needs to create N
operators with outputs to an accumulator operator which therefore has N
inputs, where N is a run time value. The problem I am having is that the
block given to the operator seems to need to have the N parameters
explicitly, it does not accept a varargs parameter. Am I just missing
something or is this just a missing feature?


  operator(inputs: gatherChannels, outputs: [sum], stateObject: [accumulator: 0.0, counter: 0]) {Object... x ->


I know I can achieve the goal with a task, but I ought to be able to do
this with operators…
--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [gpars-dev] Dataflow operators, I am missing something…

Vaclav
Administrator
Could I ask you for a JIRA issue, please? A fix is coming...

Vaclav



On Mon, Nov 17, 2014 at 7:00 AM, Russel Winder <[hidden email]> wrote:
Context is GPars dataflow operators. I have code which needs to create N
operators with outputs to an accumulator operator which therefore has N
inputs, where N is a run time value. The problem I am having is that the
block given to the operator seems to need to have the N parameters
explicitly, it does not accept a varargs parameter. Am I just missing
something or is this just a missing feature?


  operator(inputs: gatherChannels, outputs: [sum], stateObject: [accumulator: 0.0, counter: 0]) {Object... x ->


I know I can achieve the goal with a task, but I ought to be able to do
this with operators…
--
Russel.
=============================================================================
Dr Russel Winder      t: <a href="tel:%2B44%2020%207585%202200" value="+442075852200">+44 20 7585 2200   voip: [hidden email]
41 Buckmaster Road    m: <a href="tel:%2B44%207770%20465%20077" value="+447770465077">+44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



--
Reply | Threaded
Open this post in threaded view
|

Re: [gpars-dev] Dataflow operators, I am missing something…

Vaclav
Administrator
Fixed.


On Mon, Nov 17, 2014 at 11:08 AM, Václav Pech <[hidden email]> wrote:
Could I ask you for a JIRA issue, please? A fix is coming...

Vaclav



On Mon, Nov 17, 2014 at 7:00 AM, Russel Winder <[hidden email]> wrote:
Context is GPars dataflow operators. I have code which needs to create N
operators with outputs to an accumulator operator which therefore has N
inputs, where N is a run time value. The problem I am having is that the
block given to the operator seems to need to have the N parameters
explicitly, it does not accept a varargs parameter. Am I just missing
something or is this just a missing feature?


  operator(inputs: gatherChannels, outputs: [sum], stateObject: [accumulator: 0.0, counter: 0]) {Object... x ->


I know I can achieve the goal with a task, but I ought to be able to do
this with operators…
--
Russel.
=============================================================================
Dr Russel Winder      t: <a href="tel:%2B44%2020%207585%202200" value="+442075852200" target="_blank">+44 20 7585 2200   voip: [hidden email]
41 Buckmaster Road    m: <a href="tel:%2B44%207770%20465%20077" value="+447770465077" target="_blank">+44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



--



--
Reply | Threaded
Open this post in threaded view
|

Re: [gpars-dev] Dataflow operators, I am missing something…

Russel Winder-2
In reply to this post by Vaclav
On Mon, 2014-11-17 at 11:08 +0100, Václav Pech wrote:
> Could I ask you for a JIRA issue, please? A fix is coming...

I think the "bug" got fixed before I got to the website to enter a JIRA!

Sadly though, I think my trivial little codes are highlighting some
performance issues with the dataflow stuff. Only an indication just now,
more actual benchmarks needed to really pin things down.

I am not sure GBench is (at least as yet) the tool needed, I think I
have to investigate JMH.

--
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[hidden email]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [hidden email]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

signature.asc (188 bytes) Download Attachment