#include <bitv.h>

Collaboration diagram for bu_bitv:

Data Fields

struct bu_list l
size_t nbits
bitv_t bits [2]

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 peek at the bit-buffer; use the macros. The external hex form is most significant byte first (bit 0 is at the right). Note that MUVES does it differently.

Definition at line 105 of file bitv.h.

Field Documentation

struct bu_list l

linked list for caller's use

Definition at line 106 of file bitv.h.

Referenced by bu_bitv_free(), bu_bitv_new(), rt_clean_resource_basic(), rt_find_backing_dist(), rt_get_solidbitv(), rt_shootray(), and rt_shootray_bundle().

bitv_t bits[2]

variable size array

Definition at line 108 of file bitv.h.

Referenced by bu_binary_to_bitv2(), bu_bitv_and(), bu_bitv_or(), bu_bitv_to_hex(), bu_hex_to_bitv(), and dump_bitv().

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