BRL-CAD
Loading...
Searching...
No Matches

#include <resource.h>

Collaboration diagram for resource:
[legend]

Data Fields

uint32_t re_magic
 PUBLIC: Magic number.
 
int re_cpu
 PUBLIC: processor number, for ID.
 
struct bu_list re_seg
 Head of segment freelist.
 
struct bu_ptbl re_seg_blocks
 Table of malloc'ed blocks of segs.
 
long re_seglen
 
long re_segget
 
long re_segfree
 
struct bu_list re_parthead
 Head of freelist.
 
long re_partlen
 
long re_partget
 
long re_partfree
 
struct bu_list re_solid_bitv
 head of freelist
 
struct bu_list re_region_ptbl
 head of freelist
 
struct bu_list re_nmgfree
 head of NMG hitmiss freelist
 
union tree ** re_boolstack
 Stack for rt_booleval()
 
long re_boolslen
 # elements in re_boolstack[]
 
floatre_randptr
 PUBLIC: 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 spatial partitioning cells passed through
 
struct 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
 
struct bu_ptbl re_pieces_pending
 pieces with an odd hit pending
 
union treere_tree_hd
 Head of free trees.
 
long re_tree_get
 
long re_tree_malloc
 
long re_tree_free
 

Detailed Description

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.

Unless marked PUBLIC explicitly below, the details of struct resource should be considered internal implementation details. (If we can do so without performance penalty, the plan is to make most of them actually hidden. The rt_init_resource() contract already required historically gives us a way to set up a hypothetical rt_resource_internal.)

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

Definition at line 68 of file resource.h.

Field Documentation

◆ re_magic

uint32_t re_magic

PUBLIC: Magic number.

Definition at line 69 of file resource.h.

◆ re_cpu

int re_cpu

PUBLIC: processor number, for ID.

Definition at line 70 of file resource.h.

◆ re_seg

struct bu_list re_seg

Head of segment freelist.

Definition at line 71 of file resource.h.

◆ re_seg_blocks

struct bu_ptbl re_seg_blocks

Table of malloc'ed blocks of segs.

Definition at line 72 of file resource.h.

◆ re_seglen

long re_seglen

Definition at line 73 of file resource.h.

◆ re_segget

long re_segget

Definition at line 74 of file resource.h.

◆ re_segfree

long re_segfree

Definition at line 75 of file resource.h.

◆ re_parthead

struct bu_list re_parthead

Head of freelist.

Definition at line 76 of file resource.h.

◆ re_partlen

long re_partlen

Definition at line 77 of file resource.h.

◆ re_partget

long re_partget

Definition at line 78 of file resource.h.

◆ re_partfree

long re_partfree

Definition at line 79 of file resource.h.

◆ re_solid_bitv

struct bu_list re_solid_bitv

head of freelist

Definition at line 80 of file resource.h.

◆ re_region_ptbl

struct bu_list re_region_ptbl

head of freelist

Definition at line 81 of file resource.h.

◆ re_nmgfree

struct bu_list re_nmgfree

head of NMG hitmiss freelist

Definition at line 82 of file resource.h.

◆ re_boolstack

union tree** re_boolstack

Stack for rt_booleval()

Definition at line 83 of file resource.h.

◆ re_boolslen

long re_boolslen

# elements in re_boolstack[]

Definition at line 84 of file resource.h.

◆ re_randptr

float* re_randptr

PUBLIC: ptr into random number table.

Definition at line 85 of file resource.h.

◆ re_nshootray

long re_nshootray

Calls to rt_shootray()

Definition at line 87 of file resource.h.

◆ re_nmiss_model

long re_nmiss_model

Rays pruned by model RPP.

Definition at line 88 of file resource.h.

◆ re_shots

long re_shots

# calls to ft_shot()

Definition at line 90 of file resource.h.

◆ re_shot_hit

long re_shot_hit

ft_shot() returned a miss

Definition at line 91 of file resource.h.

◆ re_shot_miss

long re_shot_miss

ft_shot() returned a hit

Definition at line 92 of file resource.h.

◆ re_prune_solrpp

long re_prune_solrpp

shot missed solid RPP, ft_shot skipped

Definition at line 94 of file resource.h.

◆ re_ndup

long re_ndup

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

Definition at line 95 of file resource.h.

◆ re_nempty_cells

long re_nempty_cells

number of empty spatial partitioning cells passed through

Definition at line 96 of file resource.h.

◆ re_pieces

struct rt_piecestate* re_pieces

array [rti_nsolids_with_pieces]

Definition at line 98 of file resource.h.

◆ re_piece_ndup

long re_piece_ndup

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

Definition at line 99 of file resource.h.

◆ re_piece_shots

long re_piece_shots

# calls to ft_piece_shot()

Definition at line 100 of file resource.h.

◆ re_piece_shot_hit

long re_piece_shot_hit

ft_piece_shot() returned a miss

Definition at line 101 of file resource.h.

◆ re_piece_shot_miss

long re_piece_shot_miss

ft_piece_shot() returned a hit

Definition at line 102 of file resource.h.

◆ re_pieces_pending

struct bu_ptbl re_pieces_pending

pieces with an odd hit pending

Definition at line 103 of file resource.h.

◆ re_tree_hd

union tree* re_tree_hd

Head of free trees.

Definition at line 105 of file resource.h.

◆ re_tree_get

long re_tree_get

Definition at line 106 of file resource.h.

◆ re_tree_malloc

long re_tree_malloc

Definition at line 107 of file resource.h.

◆ re_tree_free

long re_tree_free

Definition at line 108 of file resource.h.


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