Re: [PD-dev] signal graph processing

2021-04-28 Thread Charles Z Henry
On Wed, Apr 28, 2021 at 1:23 PM IOhannes m zmölnig  wrote:
>
> On 4/28/21 18:49, David Rush wrote:
> > Hi All -
> >
> > I'm trying to figure out where to look in the code to try and understand
> > the signal rate processing better. Specifically, I want to understand how
> > the graph gets optimized

The thing is---in a single threaded process, it mostly doesn't matter
what order you do things.  Sure, you've still got the dependencies
(e.g. put this object's perform routine on the chain, only after each
other object that feeds into its inlets), but doing things in a
different order doesn't mean doing fewer computations.

So, the main way that the process runs more optimally is to keep
signals in the cache until the chain runs out of things to do with
them.  That means the graph is sorted and run depth first.  Start with
a node with no signals coming in, add its perform routine, and then
proceed depth-first until you reach an object that doesn't have all
its data.  Then, go to the next node with no signals coming in and do
the same thing.

> > Where should I start looking?
> >
>
> the core of the DSP-graph handling is in src/d_ugen.c

see also g_canvas.c
The canvas has a "dsp" method that finds all the objects in the canvas
with "dsp" methods, makes the list, and calls the ugen functions



___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


Re: [PD-dev] signal graph processing

2021-04-28 Thread IOhannes m zmölnig

On 4/28/21 18:49, David Rush wrote:

Hi All -

I'm trying to figure out where to look in the code to try and understand
the signal rate processing better. Specifically, I want to understand how
the graph gets optimized - I've read a rumour that [*~ 0] can cause a whole
signal chain to stop being computed,
and I would like to verify that in the
code and understand the whole process a bit better.


don't listen to rumours. they are often wrong (like this one)

(and it wouldn't make sense: feeding a 0-signal into an object doesn't 
necessarily mean that that object will also output zeros)




Where should I start looking?



the core of the DSP-graph handling is in src/d_ugen.c


ngsar
IOhannes


OpenPGP_signature
Description: OpenPGP digital signature
___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev


[PD-dev] signal graph processing

2021-04-28 Thread David Rush
Hi All -

I'm trying to figure out where to look in the code to try and understand
the signal rate processing better. Specifically, I want to understand how
the graph gets optimized - I've read a rumour that [*~ 0] can cause a whole
signal chain to stop being computed, and I would like to verify that in the
code and understand the whole process a bit better.

Where should I start looking?

TIA

- d
-- 
GPG Public key at http://cyber-rush.org/drr/gpg-public-key.txt
___
Pd-dev mailing list
Pd-dev@lists.iem.at
https://lists.puredata.info/listinfo/pd-dev