#include <gandalf/common/bit_array.h>
#include <gandalf/common/allocate.h>
#include <gandalf/common/misc_error.h>
#include <stdlib.h>
#include <stdarg.h>
#include <limits.h>
#include <string.h>
Functions | |
Gan_BitArray * | gan_bit_array_form_data (Gan_BitArray *ba, Gan_BitWord *data, unsigned data_words, unsigned int no_bits) |
Form new bit array using pre-allocated data array. | |
Gan_BitArray * | gan_bit_array_ms_form (Gan_MemoryStack *ms, Gan_BitArray *ba, unsigned int no_bits) |
Form new bit array using stack memory style memory allocation. | |
Gan_Bool | gan_bit_array_set_size (Gan_BitArray *ba, unsigned int no_bits) |
Reset size of existing bit array. | |
void | gan_bit_array_free (Gan_BitArray *ba) |
Free bit array. | |
void | gan_bit_array_free_va (Gan_BitArray *ba,...) |
Free NULL terminated list of bit arrays. | |
Gan_Bool | gan_bit_array_fill (Gan_BitArray *ba, Gan_Bool val) |
Set all bits in a bit array. | |
Gan_Bool | gan_bit_array_invert_i (Gan_BitArray *ba) |
Invert all the bits in a bit array. | |
Gan_BitArray * | gan_bit_array_invert_s (const Gan_BitArray *ba) |
Invert all the bits in a bit array. | |
Gan_Bool | gan_bit_array_and_i (Gan_BitArray *ba_dst, const Gan_BitArray *ba) |
Perform binary AND operation between two bit arrays. | |
Gan_Bool | gan_bit_array_nand_i (Gan_BitArray *ba_dst, const Gan_BitArray *ba) |
Perform binary NAND (not and) operation between bit arrays. | |
Gan_Bool | gan_bit_array_or_i (Gan_BitArray *ba_dst, const Gan_BitArray *ba) |
Gan_Bool | gan_bit_array_eor_i (Gan_BitArray *ba_dst, const Gan_BitArray *ba) |
Gan_Bool | gan_bit_array_andnot_i (Gan_BitArray *ba_dst, const Gan_BitArray *ba) |
Perform binary AND-NOT operation between bit arrays. | |
Gan_BitArray * | gan_bit_array_and_s (const Gan_BitArray *ba1, const Gan_BitArray *ba2) |
Gan_BitArray * | gan_bit_array_nand_s (const Gan_BitArray *ba1, const Gan_BitArray *ba2) |
Gan_BitArray * | gan_bit_array_or_s (const Gan_BitArray *ba1, const Gan_BitArray *ba2) |
Gan_BitArray * | gan_bit_array_eor_s (const Gan_BitArray *ba1, const Gan_BitArray *ba2) |
Gan_BitArray * | gan_bit_array_andnot_s (const Gan_BitArray *ba1, const Gan_BitArray *ba2) |
Gan_Bool | gan_bit_array_insert (const Gan_BitArray *src, unsigned int offset_src, Gan_BitArray *dst, unsigned int offset_dst, unsigned int no_bits) |
Insert part of one bit array in another. | |
Gan_Bool | gan_bit_array_copy_q (const Gan_BitArray *ba_source, Gan_BitArray *ba_dest) |
Copy one bit array to another. | |
Gan_BitArray * | gan_bit_array_copy_s (const Gan_BitArray *ba_source) |
Return a copy of a bit array. | |
Gan_BitArray * | gan_bit_array_expand_q (const Gan_BitArray *ba, const Gan_BitArray *ref_ba, Gan_BitArray *exp_ba) |
Expand bit array by padding it with zeros in a reference bit array. | |
Gan_BitArray * | gan_bit_array_expand_s (const Gan_BitArray *ba, const Gan_BitArray *ref_ba) |
Expand bit array by padding it with zeros in a reference bit array. | |
Gan_Bool | gan_bit_array_dilate_q (Gan_BitArray *ba_source, unsigned int no_bits, Gan_BitArray *ba_dest) |
Dilate bit array and write result into another. | |
Gan_BitArray * | gan_bit_array_dilate_s (Gan_BitArray *ba, unsigned int no_bits) |
Dilate bit array in-place. | |
Gan_Bool | gan_bit_array_shift_q (Gan_BitArray *ba_source, int no_bits, Gan_BitArray *ba_dest) |
Shift bit array and write result into another. | |
Gan_BitArray * | gan_bit_array_shift_s (Gan_BitArray *ba, int no_bits) |
Shift bit array in-place. | |
unsigned int | gan_bit_array_get_first_set_bit (Gan_BitArray *ba) |
Get the first set bit in a bit array. | |
Gan_Bool | gan_bit_array_fill_part (Gan_BitArray *ba, unsigned int offset, unsigned int no_bits, Gan_Bool val) |
Fill part of a bit array. | |
Gan_Bool | gan_bit_array_invert_part (Gan_BitArray *ba, unsigned int offset, unsigned int no_bits) |
Invert part of a bit array. | |
void | gan_bit_array_fprint (FILE *fp, const Gan_BitArray *ba, int indent) |
Print bit array in ASCII to file. |
Part of: Gandalf Library