Back to index

radiance  4R0+20100331
Functions | Variables
raypwin.c File Reference
#include "copyright.h"
#include "ray.h"

Go to the source code of this file.

Functions

void ray_pinit (char *otnm, int nproc)
int ray_psend (RAY *r)
int ray_pqueue (RAY *r)
int ray_presult (RAY *r, int poll)
void ray_pdone (int freall)
void ray_popen (int nadd)
void ray_pclose (int nsub)
void quit (int ec)

Variables

static const char RCSid [] = "$Id: raypwin.c,v 2.6 2009/12/15 19:13:45 greg Exp $"
int ray_pnprocs = 0
int ray_pnidle = 0
static RAY queued_ray

Function Documentation

void quit ( int  ec)

Definition at line 127 of file raypwin.c.

{
       exit(ec);
}
void ray_pclose ( int  nsub)

Definition at line 114 of file raypwin.c.

{
       if (nsub > ray_pnprocs)
              nsub = ray_pnprocs;
       ray_pnprocs -= nsub;
       if ((ray_pnidle -= nsub) < 0)
              ray_pnidle = 0;
}

Here is the caller graph for this function:

void ray_pdone ( int  freall)

Definition at line 90 of file raypwin.c.

{
       ray_done(freall);
       ray_pnprocs = ray_pnidle = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ray_pinit ( char *  otnm,
int  nproc 
)

Definition at line 26 of file raypwin.c.

{
       ray_pdone(0);
       ray_init(otnm);
       ray_popen(nproc);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ray_popen ( int  nadd)

Definition at line 100 of file raypwin.c.

{
       if (ray_pnprocs + nadd > 1) {
              error(WARNING, "only single process supported");
              nadd = 1 - ray_pnprocs;
       }
       ray_pnprocs += nadd;
       ray_pnidle += nadd;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int ray_pqueue ( RAY r)

Definition at line 53 of file raypwin.c.

{
       if (r == NULL)
              return(0);
       if (ray_pnidle <= 0) {
              RAY    new_ray = *r;
              *r = queued_ray;
              queued_ray = new_ray;
       }
       samplendx++;
       rayvalue(r);
       return(1);
}

Here is the caller graph for this function:

int ray_presult ( RAY r,
int  poll 
)

Definition at line 71 of file raypwin.c.

{
       if (r == NULL)
              return(0);
       if (ray_pnidle <= 0) {
              *r = queued_ray;
              samplendx++;
              rayvalue(r);
              ray_pnidle = 1;
              return(1);
       }
       return(0);
}

Here is the caller graph for this function:

int ray_psend ( RAY r)

Definition at line 38 of file raypwin.c.

{
       if (r == NULL)
              return(0);
       if (ray_pnidle <= 0)
              return(0);
       queued_ray = *r;
       ray_pnidle = 0;
       return(1);
}

Variable Documentation

RAY queued_ray [static]

Definition at line 23 of file raypwin.c.

int ray_pnidle = 0

Definition at line 21 of file raypwin.c.

int ray_pnprocs = 0

Definition at line 20 of file raypwin.c.

const char RCSid[] = "$Id: raypwin.c,v 2.6 2009/12/15 19:13:45 greg Exp $" [static]

Definition at line 2 of file raypwin.c.