> On 11 Aug 2015, at 19:48, Fons Adriaensen <f...@linuxaudio.org> wrote:
>> 
>> Simon (last name forgotten right now) added a variation on topological
>> sort years ago, specifically to deal with some issues. His comment
>> was:
>> 
>> /* How the sort works:
>> ...
> 
> ???

Fons,

I wrote that comment whilst implementing what the list agreed was the best way 
to deal with cycles in the graph. Its not “how the sort works” so much as “how 
we fudged the sort to deal with cycles”.

I think the underlying sort mechanism was the same before I did that: Call the 
sort function using the transitive closure of the who-feeds-who relation as the 
comparison. (Except now its the 
who-feeds-who-after-inverting-feedback-connections relation).

That was always *supposed* to achieve a topological sort (before and after the 
feedback mods) but you’re saying it doesn’t: The merge sort behind 
jack_slist_sort can outright fail with a partial ordering because, if A isn’t 
connected to B and B isn’t connected to C, it may never even ask about the 
relationship between A and C.

In which case yes, its a bug and it goes way back.

Simon Jenkins
Bristol, UK


_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Reply via email to