BRL-CAD
resource Struct Reference

#include <raytrace.h>

Collaboration diagram for resource:
[legend]

Data Fields

uint32_t re_magic
 Magic number. More...
 
int re_cpu
 processor number, for ID More...
 
struct bu_list re_seg
 Head of segment freelist. More...
 
struct bu_ptbl re_seg_blocks
 Table of malloc'ed blocks of segs. More...
 
long re_seglen
 
long re_segget
 
long re_segfree
 
struct bu_list re_parthead
 Head of freelist. More...
 
long re_partlen
 
long re_partget
 
long re_partfree
 
struct bu_list re_solid_bitv
 head of freelist More...
 
struct bu_list re_region_ptbl
 head of freelist More...
 
struct bu_list re_nmgfree
 head of NMG hitmiss freelist More...
 
union tree ** re_boolstack
 Stack for rt_booleval() More...
 
long re_boolslen
 

elements in re_boolstack[]

More...
 
float * re_randptr
 ptr into random number table More...
 
long re_nshootray
 Calls to rt_shootray() More...
 
long re_nmiss_model
 Rays pruned by model RPP. More...
 
long re_shots
 

calls to ft_shot()

More...
 
long re_shot_hit
 ft_shot() returned a miss More...
 
long re_shot_miss
 ft_shot() returned a hit More...
 
long re_prune_solrpp
 shot missed solid RPP, ft_shot skipped More...
 
long re_ndup
 ft_shot() calls skipped for already-ft_shot() solids More...
 
long re_nempty_cells
 number of empty NUgrid cells passed through More...
 
struct rt_piecestatere_pieces
 array [rti_nsolids_with_pieces] More...
 
long re_piece_ndup
 ft_piece_shot() calls skipped for already-ft_shot() solids More...
 
long re_piece_shots
 

calls to ft_piece_shot()

More...
 
long re_piece_shot_hit
 ft_piece_shot() returned a miss More...
 
long re_piece_shot_miss
 ft_piece_shot() returned a hit More...
 
struct bu_ptbl re_pieces_pending
 pieces with an odd hit pending More...
 
union treere_tree_hd
 Head of free trees. More...
 
long re_tree_get
 
long re_tree_malloc
 
long re_tree_free
 
struct directoryre_directory_hd
 
struct bu_ptbl re_directory_blocks
 Table of malloc'ed blocks. More...
 

Detailed Description

Per-CPU statistics and resources.

One of these structures is needed per thread of execution, usually with calling applications creating an array with at least MAX_PSW elements. 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.

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.

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

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

Definition at line 1440 of file raytrace.h.

Field Documentation

struct bu_list re_seg

Head of segment freelist.

Definition at line 1443 of file raytrace.h.

Referenced by rt_alloc_seg_block(), rt_clean_resource_basic(), and rt_init_resource().

struct bu_ptbl re_seg_blocks

Table of malloc'ed blocks of segs.

Definition at line 1444 of file raytrace.h.

Referenced by rt_alloc_seg_block(), rt_clean_resource_basic(), and rt_init_resource().

long re_seglen

Definition at line 1445 of file raytrace.h.

Referenced by rt_alloc_seg_block().

long re_segget

Definition at line 1446 of file raytrace.h.

long re_segfree

Definition at line 1447 of file raytrace.h.

struct bu_list re_parthead

Head of freelist.

Definition at line 1448 of file raytrace.h.

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

long re_partlen

Definition at line 1449 of file raytrace.h.

long re_partget

Definition at line 1450 of file raytrace.h.

long re_partfree

Definition at line 1451 of file raytrace.h.

struct bu_list re_solid_bitv
struct bu_list re_region_ptbl

head of freelist

Definition at line 1453 of file raytrace.h.

Referenced by rt_clean_resource_basic(), rt_init_resource(), rt_shootray(), rt_shootray_bundle(), and rt_vshootray().

struct bu_list re_nmgfree

head of NMG hitmiss freelist

Definition at line 1454 of file raytrace.h.

Referenced by ged_E(), nmg_class_ray_vs_shell(), rt_clean_resource_basic(), and rt_init_resource().

union tree** re_boolstack
long re_boolslen

elements in re_boolstack[]

Definition at line 1456 of file raytrace.h.

Referenced by rt_booleval(), rt_clean_resource_basic(), rt_grow_boolstack(), rt_init_resource(), rt_optim_tree(), and rt_solid_bitfinder().

float* re_randptr

ptr into random number table

Definition at line 1457 of file raytrace.h.

Referenced by rt_init_resource(), star_render(), wood_setup(), wood_setup_2(), and wood_turb().

long re_nshootray

Calls to rt_shootray()

Definition at line 1459 of file raytrace.h.

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

long re_nmiss_model

Rays pruned by model RPP.

Definition at line 1460 of file raytrace.h.

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

long re_shots

calls to ft_shot()

Definition at line 1462 of file raytrace.h.

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

long re_shot_hit

ft_shot() returned a miss

Definition at line 1463 of file raytrace.h.

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

long re_shot_miss

ft_shot() returned a hit

Definition at line 1464 of file raytrace.h.

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

long re_prune_solrpp

shot missed solid RPP, ft_shot skipped

Definition at line 1466 of file raytrace.h.

Referenced by rt_add_res_stats(), 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 1467 of file raytrace.h.

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

long re_nempty_cells

number of empty NUgrid cells passed through

Definition at line 1468 of file raytrace.h.

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

struct rt_piecestate* re_pieces

array [rti_nsolids_with_pieces]

Definition at line 1470 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 1471 of file raytrace.h.

Referenced by rt_add_res_stats(), rt_zero_res_stats(), and XGLUE().

long re_piece_shots

calls to ft_piece_shot()

Definition at line 1472 of file raytrace.h.

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

long re_piece_shot_hit

ft_piece_shot() returned a miss

Definition at line 1473 of file raytrace.h.

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

long re_piece_shot_miss

ft_piece_shot() returned a hit

Definition at line 1474 of file raytrace.h.

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

struct bu_ptbl re_pieces_pending

pieces with an odd hit pending

Definition at line 1475 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 1477 of file raytrace.h.

Referenced by rt_clean_resource_basic().

long re_tree_get

Definition at line 1478 of file raytrace.h.

long re_tree_malloc

Definition at line 1479 of file raytrace.h.

long re_tree_free

Definition at line 1480 of file raytrace.h.

struct directory* re_directory_hd
struct bu_ptbl re_directory_blocks

Table of malloc'ed blocks.

Definition at line 1482 of file raytrace.h.

Referenced by db_alloc_directory_block(), rt_clean_resource_complete(), and rt_init_resource().


The documentation for this struct was generated from the following file: