resource Struct Reference
[librt geometry, raytracing]

#include <raytrace.h>

Collaboration diagram for resource:

Collaboration graph
[legend]

Data Fields

long re_magic
 Magic number.
int re_cpu
 processor number, for ID
bu_list re_seg
 Head of segment freelist.
bu_ptbl re_seg_blocks
 Table of malloc'ed blocks of segs.
long re_seglen
long re_segget
long re_segfree
bu_list re_parthead
 Head of freelist.
long re_partlen
long re_partget
long re_partfree
bu_list re_solid_bitv
 head of freelist
bu_list re_region_ptbl
 head of freelist
bu_list re_nmgfree
 head of NMG hitmiss freelist
tree ** re_boolstack
 Stack for rt_booleval().
long re_boolslen
 # elements in re_boolstack[]
float * re_randptr
 ptr into random number table
long re_nshootray
 Calls to rt_shootray().
long re_nmiss_model
 Rays pruned by model RPP.
long re_shots
 # calls to ft_shot()
long re_shot_hit
 ft_shot() returned a miss
long re_shot_miss
 ft_shot() returned a hit
long re_prune_solrpp
 shot missed solid RPP, ft_shot skipped
long re_ndup
 ft_shot() calls skipped for already-ft_shot() solids
long re_nempty_cells
 number of empty NUgrid cells passed through
rt_piecestatere_pieces
 array [rti_nsolids_with_pieces]
long re_piece_ndup
 ft_piece_shot() calls skipped for already-ft_shot() solids
long re_piece_shots
 # calls to ft_piece_shot()
long re_piece_shot_hit
 ft_piece_shot() returned a miss
long re_piece_shot_miss
 ft_piece_shot() returned a hit
bu_ptbl re_pieces_pending
 pieces with an odd hit pending
treere_tree_hd
 Head of free trees.
long re_tree_get
long re_tree_malloc
long re_tree_free
directoryre_directory_hd
bu_ptbl re_directory_blocks
 Table of malloc'ed blocks.

Detailed Description

R E S O U R C E

Per-CPU statistics and resources.

One of these structures is allocated per processor. To prevent excessive competition for free structures, memory is now allocated on a per-processor basis. The application structure a_resource element specifies the resource structure to be used; if uniprocessing, a null a_resource pointer results in using the internal global structure (&rt_uniresource), making initial application development simpler.

Applications are responsible for calling rt_init_resource() for each resource structure before letting LIBRT use them.

Note that if multiple models are being used, the partition and bitv structures (which are variable length) will require there to be ncpus * nmodels resource structures, the selection of which will be the responsibility of the application.

Per-processor statistics are initially collected in here, and then posted to rt_i by rt_add_res_stats().

Definition at line 1467 of file raytrace.h.


Field Documentation

long re_magic
 

Magic number.

Definition at line 1468 of file raytrace.h.

Referenced by db5_diradd(), db_diradd5(), dgo_E_cmd(), nmg_class_ray_vs_shell(), rt_cell_n_on_ray(), rt_dirbuild(), rt_init_resource(), rt_shootray(), rt_shootray_bundle(), wdb_dbopen(), and wdb_fopen_v().

int re_cpu
 

processor number, for ID

Definition at line 1469 of file raytrace.h.

Referenced by rt_cell_n_on_ray(), rt_clean_resource(), rt_init_resource(), rt_shootray(), rt_shootray_bundle(), and rt_submodel_shot().

struct bu_list re_seg
 

Head of segment freelist.

Definition at line 1470 of file raytrace.h.

Referenced by rt_clean_resource(), and rt_init_resource().

struct bu_ptbl re_seg_blocks
 

Table of malloc'ed blocks of segs.

Definition at line 1471 of file raytrace.h.

Referenced by rt_clean_resource(), and rt_init_resource().

long re_seglen
 

Definition at line 1472 of file raytrace.h.

long re_segget
 

Definition at line 1473 of file raytrace.h.

long re_segfree
 

Definition at line 1474 of file raytrace.h.

struct bu_list re_parthead
 

Head of freelist.

Definition at line 1475 of file raytrace.h.

Referenced by rt_cell_n_on_ray(), rt_clean_resource(), rt_init_resource(), rt_shootray(), and rt_shootray_bundle().

long re_partlen
 

Definition at line 1476 of file raytrace.h.

long re_partget
 

Definition at line 1477 of file raytrace.h.

long re_partfree
 

Definition at line 1478 of file raytrace.h.

struct bu_list re_solid_bitv
 

head of freelist

Definition at line 1479 of file raytrace.h.

Referenced by get_solidbitv(), rt_clean_resource(), and rt_init_resource().

struct bu_list re_region_ptbl
 

head of freelist

Definition at line 1480 of file raytrace.h.

Referenced by rt_clean_resource(), rt_init_resource(), rt_shootray(), and rt_shootray_bundle().

struct bu_list re_nmgfree
 

head of NMG hitmiss freelist

Definition at line 1481 of file raytrace.h.

Referenced by dgo_E_cmd(), nmg_class_ray_vs_shell(), rt_clean_resource(), and rt_init_resource().

union tree** re_boolstack
 

Stack for rt_booleval().

Definition at line 1482 of file raytrace.h.

Referenced by rt_booleval(), rt_clean_resource(), rt_init_resource(), rt_optim_tree(), and rt_solid_bitfinder().

long re_boolslen
 

# elements in re_boolstack[]

Definition at line 1483 of file raytrace.h.

Referenced by rt_clean_resource(), and rt_init_resource().

float* re_randptr
 

ptr into random number table

Definition at line 1484 of file raytrace.h.

long re_nshootray
 

Calls to rt_shootray().

Definition at line 1486 of file raytrace.h.

Referenced by rt_shootray(), and rt_zero_res_stats().

long re_nmiss_model
 

Rays pruned by model RPP.

Definition at line 1487 of file raytrace.h.

Referenced by rt_shootray(), rt_shootray_bundle(), and rt_zero_res_stats().

long re_shots
 

# calls to ft_shot()

Definition at line 1489 of file raytrace.h.

Referenced by rt_shootray(), rt_shootray_bundle(), and rt_zero_res_stats().

long re_shot_hit
 

ft_shot() returned a miss

Definition at line 1490 of file raytrace.h.

Referenced by rt_zero_res_stats().

long re_shot_miss
 

ft_shot() returned a hit

Definition at line 1491 of file raytrace.h.

Referenced by rt_shootray(), rt_shootray_bundle(), and rt_zero_res_stats().

long re_prune_solrpp
 

shot missed solid RPP, ft_shot skipped

Definition at line 1493 of file raytrace.h.

Referenced by rt_shootray(), rt_shootray_bundle(), and rt_zero_res_stats().

long re_ndup
 

ft_shot() calls skipped for already-ft_shot() solids

Definition at line 1494 of file raytrace.h.

Referenced by rt_shootray(), rt_shootray_bundle(), and rt_zero_res_stats().

long re_nempty_cells
 

number of empty NUgrid cells passed through

Definition at line 1495 of file raytrace.h.

Referenced by rt_shootray(), rt_shootray_bundle(), and rt_zero_res_stats().

struct rt_piecestate* re_pieces
 

array [rti_nsolids_with_pieces]

Definition at line 1497 of file raytrace.h.

Referenced by rt_res_pieces_clean(), rt_res_pieces_init(), and rt_shootray().

long re_piece_ndup
 

ft_piece_shot() calls skipped for already-ft_shot() solids

Definition at line 1498 of file raytrace.h.

Referenced by rt_zero_res_stats().

long re_piece_shots
 

# calls to ft_piece_shot()

Definition at line 1499 of file raytrace.h.

Referenced by rt_shootray(), and rt_zero_res_stats().

long re_piece_shot_hit
 

ft_piece_shot() returned a miss

Definition at line 1500 of file raytrace.h.

Referenced by rt_shootray(), and rt_zero_res_stats().

long re_piece_shot_miss
 

ft_piece_shot() returned a hit

Definition at line 1501 of file raytrace.h.

Referenced by rt_shootray(), and rt_zero_res_stats().

struct bu_ptbl re_pieces_pending
 

pieces with an odd hit pending

Definition at line 1502 of file raytrace.h.

Referenced by rt_res_pieces_clean(), and rt_shootray().

union tree* re_tree_hd
 

Head of free trees.

Definition at line 1504 of file raytrace.h.

Referenced by rt_clean_resource().

long re_tree_get
 

Definition at line 1505 of file raytrace.h.

long re_tree_malloc
 

Definition at line 1506 of file raytrace.h.

long re_tree_free
 

Definition at line 1507 of file raytrace.h.

struct directory* re_directory_hd
 

Definition at line 1508 of file raytrace.h.

Referenced by db_close(), and db_dirdelete().

struct bu_ptbl re_directory_blocks
 

Table of malloc'ed blocks.

Definition at line 1509 of file raytrace.h.

Referenced by rt_init_resource().


The documentation for this struct was generated from the following file:
Generated on Mon Sep 18 01:25:15 2006 for BRL-CAD by  doxygen 1.4.6