POV-Ray : Newsgroups : povray.programming : 3.7 Overview Server Time
29 Mar 2024 05:54:12 EDT (-0400)
  3.7 Overview (Message 1 to 3 of 3)  
From: Jack Burton
Subject: 3.7 Overview
Date: 10 May 2011 07:00:01
Message: <web.4dc919e0bfc1f12ced1c03580@news.povray.org>
I'm having some trouble pinning down an overview of 3.7 and was hoping someone
could clarify some issues for me.

So far:

- Client: entrypoint and basic init (the session).
- Frontend: the state machine; a single thread that populates a queue with work
from the view.
- Backend: multiple worker threads that grab work from the queue and render.

I can follow the code until Start(), but things get a little hairy here and I
can't seem to figure out the state machine.

Any help or links would be most appreciated.


Post a reply to this message

From: Le Forgeron
Subject: Re: 3.7 Overview
Date: 10 May 2011 07:21:54
Message: <4dc91fd2$1@news.povray.org>
Le 10/05/2011 12:56, Jack Burton a écrit :
> I'm having some trouble pinning down an overview of 3.7 and was hoping someone
> could clarify some issues for me.
> 
> So far:
> 
> - Client: entrypoint and basic init (the session).
> - Frontend: the state machine; a single thread that populates a queue with work
> from the view.
> - Backend: multiple worker threads that grab work from the queue and render.
> 
> I can follow the code until Start(), but things get a little hairy here and I
> can't seem to figure out the state machine.
> 
> Any help or links would be most appreciated.

Which operating system are you using ?
What code are you looking at ?

Are you aware of thread-class ?
(how creating an instance in fact create a thread that run a specific
code...)

From the dynamic point of view: once the "scene" has been populated (and
that might include a thread for parsing, as well as many for photons, so
it's not a simple road either), there is N rendering threads (+WT N),
and one collecting thread (all of them on a big set of data).
Each render thread selects a box/square/... on the final picture and
compute it whole: the resulting block is queue to the collecting thread.
It then repeat unless there is no more block to render.

The collecting thread get the block, put its data in the image (in
internal format, no compression). It also display the block if needed,
and update/display the counters of pixels.

When the image has been completed, a single thread (the collecting one,
IIRC) convert it to the output format.

-- 
Software is like dirt - it costs time and money to change it and move it
around.

Just because you can't see it, it doesn't weigh anything,
and you can't drill a hole in it and stick a rivet into it doesn't mean
it's free.


Post a reply to this message

From: Jack Burton
Subject: Re: 3.7 Overview
Date: 10 May 2011 08:40:01
Message: <web.4dc931a8dc70bfa3ed1c03580@news.povray.org>
Le_Forgeron <lef### [at] freefr> wrote:

> Which operating system are you using ?

Ubuntu.

> What code are you looking at ?

As I said above, 3.7.

> Are you aware of thread-class ?

I've seen the boost references and the thread creation, but it's specifically
the state machine that's causing me a headache. It appears that the client and
the frontend set flags/messages that causes the backend to execute certain paths
of code. Could you give me an example?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.