bu_bitv Struct Reference
[Bit Vectors]

Bit vector data structure. More...

#include <bu.h>

Collaboration diagram for bu_bitv:

Collaboration graph
[legend]

Data Fields

bu_list l
 linked list for caller's use
unsigned int nbits
 actual size of bits[], in bits
bitv_t bits [2]
 variable size array

Detailed Description

Bit vector data structure.

bu_bitv uses a little-endian encoding, placing bit 0 on the right side of the 0th word. This is done only because left-shifting a 1 can be done in an efficient word-length-independent manner; going the other way would require a compile-time constant with only the sign bit set, and an unsigned right shift, which some machines don't have in hardware, or an extra subtraction.

Application code should *never* peak at the bit-buffer; use the macros.

The external hex form is most signigicant byte first (bit 0 is at the right). Note that MUVES does it differently

Definition at line 841 of file bu.h.


Field Documentation

struct bu_list l
 

linked list for caller's use

Definition at line 842 of file bu.h.

Referenced by bu_bitv_free(), bu_bitv_new(), get_solidbitv(), and rt_clean_resource().

unsigned int nbits
 

actual size of bits[], in bits

Definition at line 843 of file bu.h.

Referenced by bu_bitv_and(), bu_bitv_new(), bu_bitv_or(), get_solidbitv(), and rt_clean_resource().

bitv_t bits[2]
 

variable size array

Definition at line 844 of file bu.h.

Referenced by bu_bitv_and(), bu_bitv_or(), and bu_hex_to_bitv().


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