/netbsd-current/external/bsd/ipf/dist/lib/ |
H A D | ntomask.c | 13 int ntomask(family, nbits, ap) 14 int family, nbits; 19 if (nbits < 0) 25 if (nbits > 32 || use_inet6 == 1) 27 if (nbits == 0) { 31 mask <<= (32 - nbits); 38 if ((nbits > 128) || (use_inet6 == -1)) 40 fill6bits(nbits, ap);
|
/netbsd-current/sys/external/bsd/drm2/include/linux/ |
H A D | bitmap.h | 42 * bitmap_zero(bitmap, nbits) 44 * Zero a bitmap that was allocated to have nbits bits. Yes, this 45 * zeros bits past nbits. 48 bitmap_zero(unsigned long *bitmap, size_t nbits) argument 51 size_t n = howmany(nbits, bpl); 57 * bitmap_empty(bitmap, nbits) 59 * Return true if all bits at 0, 1, 2, ..., nbits-2, nbits-1 are 63 bitmap_empty(const unsigned long *bitmap, size_t nbits) argument 67 for (; nbits > 86 bitmap_weight(const unsigned long *bitmap, size_t nbits) argument 106 bitmap_set(unsigned long *bitmap, size_t startbit, size_t nbits) argument 141 bitmap_clear(unsigned long *bitmap, size_t startbit, size_t nbits) argument 176 bitmap_copy(unsigned long *dst, const unsigned long *src, size_t nbits) argument 191 bitmap_complement(unsigned long *dst, const unsigned long *src, size_t nbits) argument 208 bitmap_and(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, size_t nbits) argument 226 bitmap_andnot(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, size_t nbits) argument 244 bitmap_or(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, size_t nbits) argument 255 bitmap_zalloc(size_t nbits, gfp_t gfp) argument [all...] |
H A D | dma-mapping.h | 60 DMA_BIT_MASK(unsigned nbits) argument 63 if (nbits == CHAR_BIT*sizeof(uintmax_t)) 65 return ~(~(uintmax_t)0 << nbits);
|
/netbsd-current/external/bsd/jemalloc/dist/include/jemalloc/internal/ |
H A D | bitmap.h | 36 #define BITMAP_BITS2GROUPS(nbits) \ 37 (((nbits) + BITMAP_GROUP_NBITS_MASK) >> LG_BITMAP_GROUP_NBITS) 42 #define BITMAP_GROUPS_L0(nbits) \ 43 BITMAP_BITS2GROUPS(nbits) 44 #define BITMAP_GROUPS_L1(nbits) \ 45 BITMAP_BITS2GROUPS(BITMAP_BITS2GROUPS(nbits)) 46 #define BITMAP_GROUPS_L2(nbits) \ 47 BITMAP_BITS2GROUPS(BITMAP_BITS2GROUPS(BITMAP_BITS2GROUPS((nbits)))) 48 #define BITMAP_GROUPS_L3(nbits) \ 50 BITMAP_BITS2GROUPS((nbits))))) 154 size_t nbits; member in struct:bitmap_info_s [all...] |
/netbsd-current/external/bsd/jemalloc/include/jemalloc/internal/ |
H A D | bitmap.h | 36 #define BITMAP_BITS2GROUPS(nbits) \ 37 (((nbits) + BITMAP_GROUP_NBITS_MASK) >> LG_BITMAP_GROUP_NBITS) 42 #define BITMAP_GROUPS_L0(nbits) \ 43 BITMAP_BITS2GROUPS(nbits) 44 #define BITMAP_GROUPS_L1(nbits) \ 45 BITMAP_BITS2GROUPS(BITMAP_BITS2GROUPS(nbits)) 46 #define BITMAP_GROUPS_L2(nbits) \ 47 BITMAP_BITS2GROUPS(BITMAP_BITS2GROUPS(BITMAP_BITS2GROUPS((nbits)))) 48 #define BITMAP_GROUPS_L3(nbits) \ 50 BITMAP_BITS2GROUPS((nbits))))) 154 size_t nbits; member in struct:bitmap_info_s [all...] |
/netbsd-current/external/bsd/jemalloc/dist/test/unit/ |
H A D | bitmap.c | 96 test_bitmap_initializer_body(const bitmap_info_t *binfo, size_t nbits) { argument 98 bitmap_info_init(&binfo_dyn, nbits); 102 "nbits=%zu", nbits); local 103 assert_zu_eq(binfo->nbits, binfo_dyn.nbits, 105 "nbits=%zu", nbits); 109 "nbits=%zu", nbits); 140 test_bitmap_size_body(const bitmap_info_t *binfo, size_t nbits, size_t prev_size) argument 150 size_t nbits, prev_size; local 170 test_bitmap_init_body(const bitmap_info_t *binfo, size_t nbits) argument 190 size_t nbits; local 207 test_bitmap_set_body(const bitmap_info_t *binfo, size_t nbits) argument 221 size_t nbits; local 238 test_bitmap_unset_body(const bitmap_info_t *binfo, size_t nbits) argument 259 size_t nbits; local 276 test_bitmap_xfu_body(const bitmap_info_t *binfo, size_t nbits) argument 406 size_t nbits; local [all...] |
/netbsd-current/external/lgpl3/gmp/dist/mpz/ |
H A D | urandomb.c | 36 mpz_urandomb (mpz_ptr rop, gmp_randstate_t rstate, mp_bitcnt_t nbits) argument 41 size = BITS_TO_LIMBS (nbits); 44 _gmp_rand (rp, rstate, nbits);
|
H A D | rrandomb.c | 38 mpz_rrandomb (mpz_ptr x, gmp_randstate_t rstate, mp_bitcnt_t nbits) argument 43 nl = BITS_TO_LIMBS (nbits); 44 if (nbits != 0) 47 gmp_rrandomb (xp, rstate, nbits); 63 gmp_rrandomb (mp_ptr rp, gmp_randstate_t rstate, mp_bitcnt_t nbits) argument 71 i = BITS_TO_LIMBS (nbits) - 1; 72 rp[i] = GMP_NUMB_MAX >> (GMP_NUMB_BITS - (nbits % GMP_NUMB_BITS)) % GMP_NUMB_BITS; 77 cap_chunksize = nbits / (ranm % 4 + 1); 80 bi = nbits;
|
H A D | array_init.c | 34 mpz_array_init (mpz_ptr arr, mp_size_t arr_size, mp_size_t nbits) argument 40 nlimbs = nbits / GMP_NUMB_BITS + 1;
|
/netbsd-current/external/lgpl3/gmp/dist/mpf/ |
H A D | urandomb.c | 1 /* mpf_urandomb (rop, state, nbits) -- Generate a uniform pseudorandom 37 mpf_urandomb (mpf_t rop, gmp_randstate_t rstate, mp_bitcnt_t nbits) argument 45 nlimbs = BITS_TO_LIMBS (nbits); 51 nbits = nlimbs * GMP_NUMB_BITS; 54 _gmp_rand (rp, rstate, nbits); 56 /* If nbits isn't a multiple of GMP_NUMB_BITS, shift up. */ 57 if (nbits % GMP_NUMB_BITS != 0) 58 mpn_lshift (rp, rp, nlimbs, GMP_NUMB_BITS - nbits % GMP_NUMB_BITS);
|
/netbsd-current/external/lgpl3/mpfr/dist/src/ |
H A D | urandomb.c | 1 /* mpfr_urandomb (rop, state, nbits) -- Generate a uniform pseudorandom 30 /* generate nbits random bits into mp[], assuming mp was allocated to contain 34 mpfr_prec_t nbits) 38 MPFR_ASSERTN (nbits >= 1); 42 MPFR_ASSERTN ((mp_bitcnt_t) -1 < 0 || nbits <= (mp_bitcnt_t) -1); 44 mpz_urandomb (z, rstate, nbits); 45 MPN_COPY(mp, PTR(z), MPFR_PREC2LIMBS (nbits)); 53 mpfr_prec_t nbits; local 60 nbits = MPFR_PREC (rop); 63 cnt = nlimbs * GMP_NUMB_BITS - nbits; 33 mpfr_rand_raw(mpfr_limb_ptr mp, gmp_randstate_t rstate, mpfr_prec_t nbits) argument [all...] |
H A D | get_flt.c | 91 int nbits; local 96 nbits = IEEE_FLT_MANT_DIG; /* 24 */ 100 nbits += 125 + e; 101 MPFR_ASSERTD (1 <= nbits && nbits < 24); 104 nbits, rnd_mode); 115 np = MPFR_PREC2LIMBS (nbits);
|
H A D | urandom.c | 57 mpfr_prec_t nbits; local 74 nbits = MPFR_PREC (rop); 103 /* Step 2 (significand): we need generate only nbits-1 bits, since the 105 if (MPFR_UNLIKELY (nbits == 1)) 111 mpfr_rand_raw (rp, rstate, nbits - 1); 113 n = nlimbs * GMP_NUMB_BITS - nbits;
|
/netbsd-current/external/bsd/jemalloc/dist/src/ |
H A D | bitmap.c | 12 bitmap_info_init(bitmap_info_t *binfo, size_t nbits) { argument 16 assert(nbits > 0); 17 assert(nbits <= (ZU(1) << LG_BITMAP_MAXBITS)); 20 * Compute the number of groups necessary to store nbits bits, and 25 group_count = BITMAP_BITS2GROUPS(nbits); 36 binfo->nbits = nbits; 67 extra = (BITMAP_GROUP_NBITS - (binfo->nbits & BITMAP_GROUP_NBITS_MASK)) 86 bitmap_info_init(bitmap_info_t *binfo, size_t nbits) { argument 87 assert(nbits > [all...] |
/netbsd-current/external/gpl3/gdb.old/dist/gdb/unittests/ |
H A D | copy_bitwise-selftests.c | 33 ULONGEST nbits, int msb0) 38 for (i = offs / 8, j = offs % 8; nbits; i++, j = 0) 41 for (; j < 8 && nbits; j++, nbits--) 51 unsigned int nbits, int msb0) 53 size_t len = align_up (dest_offset + nbits, 8); 66 nbits: 2 76 bits_to_str (expected + dest_offset, source, source_offset, nbits, msb0); 81 copy_bitwise (buf, dest_offset, source, source_offset, nbits, msb0); 88 expected, actual, source_offset, nbits, dest_offse 32 bits_to_str(char *str, const gdb_byte *bits, ULONGEST offs, ULONGEST nbits, int msb0) argument 49 check_copy_bitwise(const gdb_byte *dest, unsigned int dest_offset, const gdb_byte *source, unsigned int source_offset, unsigned int nbits, int msb0) argument [all...] |
/netbsd-current/external/gpl3/gdb/dist/gdb/unittests/ |
H A D | copy_bitwise-selftests.c | 33 ULONGEST nbits, int msb0) 38 for (i = offs / 8, j = offs % 8; nbits; i++, j = 0) 41 for (; j < 8 && nbits; j++, nbits--) 51 unsigned int nbits, int msb0) 53 size_t len = align_up (dest_offset + nbits, 8); 66 nbits: 2 76 bits_to_str (expected + dest_offset, source, source_offset, nbits, msb0); 81 copy_bitwise (buf, dest_offset, source, source_offset, nbits, msb0); 88 expected, actual, source_offset, nbits, dest_offse 32 bits_to_str(char *str, const gdb_byte *bits, ULONGEST offs, ULONGEST nbits, int msb0) argument 49 check_copy_bitwise(const gdb_byte *dest, unsigned int dest_offset, const gdb_byte *source, unsigned int source_offset, unsigned int nbits, int msb0) argument [all...] |
/netbsd-current/include/ |
H A D | bitstring.h | 66 /* bytes in a bitstring of nbits bits */ 67 #define bitstr_size(nbits) \ 68 (size_t)((uint32_t)((nbits) + 7) >> 3) 71 #define bit_alloc(nbits) \ 72 calloc(bitstr_size(nbits), sizeof(bitstr_t)) 75 #define bit_decl(name, nbits) \ 76 ((name)[bitstr_size(nbits)]) 114 #define bit_ffc(name, nbits, value) do { \ 116 size_t _bit, _nbits = nbits; \ 127 #define bit_ffs(name, nbits, valu [all...] |
/netbsd-current/external/bsd/openldap/dist/libraries/liblutil/ |
H A D | detach.c | 60 int i, sd, nbits, pid; local 63 nbits = sysconf( _SC_OPEN_MAX ); 65 nbits = getdtablesize(); 67 nbits = FD_SETSIZE; 71 if ( nbits > FD_SETSIZE ) { 72 nbits = FD_SETSIZE; 121 for ( i = 0; i < nbits; i++ ) {
|
/netbsd-current/sys/arch/ia64/stand/common/ |
H A D | bitstring.h | 50 /* bytes in a bitstring of nbits bits */ 51 #define bitstr_size(nbits) \ 52 (((nbits) + 7) >> 3) 55 #define bit_alloc(nbits) \ 56 (bitstr_t *)calloc((size_t)bitstr_size(nbits), sizeof(bitstr_t)) 59 #define bit_decl(name, nbits) \ 60 ((name)[bitstr_size(nbits)]) 109 #define bit_ffc(name, nbits, value) do { \ 111 register int _byte, _nbits = (nbits); \ 122 if (_value >= nbits) \ [all...] |
/netbsd-current/external/lgpl3/gmp/dist/tests/rand/ |
H A D | t-rand.c | 83 int nbits; member in struct:rt 135 usage: t-rand [function nbits]\n\ 137 nbits is number of bits\n\ 143 int nbits = 1; local 161 nbits = atoi (argv[2]); 176 gmp_randinit (rstate, GMP_RAND_ALG_LC, a->nbits); 183 mpz_urandomb (rz, rstate, a->nbits); 187 printf ("z%d: ", a->nbits); 196 printf ("z%d ", a->nbits); 206 gmp_randinit (rstate, GMP_RAND_ALG_LC, a->nbits); [all...] |
/netbsd-current/external/lgpl3/gmp/dist/mpn/generic/ |
H A D | get_d.c | 141 int lshift, nbits; local 182 nbits = GMP_LIMB_BITS - lshift; 184 if (nbits < 53 && size > 1) 188 x >>= nbits; local 190 nbits += GMP_NUMB_BITS; 192 if (LIMBS_PER_DOUBLE >= 3 && nbits < 53 && size > 2) 196 x >>= nbits; local 198 nbits += GMP_NUMB_BITS; 217 nbits = GMP_LIMB_BITS - lshift - 21; 223 nbits 245 x >>= nbits; local 253 x >>= nbits; local 261 x >>= nbits; local [all...] |
H A D | random2.c | 66 gmp_rrandomb (mp_ptr rp, gmp_randstate_t rstate, mp_bitcnt_t nbits) argument 74 i = BITS_TO_LIMBS (nbits) - 1; 75 rp[i] = GMP_NUMB_MAX >> (GMP_NUMB_BITS - (nbits % GMP_NUMB_BITS)) % GMP_NUMB_BITS; 80 cap_chunksize = nbits / (ranm % 4 + 1); 83 bi = nbits;
|
/netbsd-current/external/cddl/osnet/dist/uts/common/sys/ |
H A D | bitmap.h | 104 #define BT_BITOUL(nbits) \ 105 (((nbits) + BT_NBIPUL - 1l) / BT_NBIPUL) 106 #define BT_SIZEOFMAP(nbits) \ 107 (BT_BITOUL(nbits) * sizeof (ulong_t)) 116 #define BT_BITOUL32(nbits) \ 117 (((nbits) + BT_NBIPUL32 - 1l) / BT_NBIPUL32) 118 #define BT_SIZEOFMAP32(nbits) \ 119 (BT_BITOUL32(nbits) * sizeof (uint_t)) 149 extern index_t bt_availbit(ulong_t *bitmap, size_t nbits);
|
/netbsd-current/lib/libc/gdtoa/ |
H A D | gethex.c | 45 int big, esign, havedig, irv, j, k, n, n0, nbits, up, zret; local 171 nbits = fpi->nbits; 172 n0 = n = (unsigned int)nbits >> kshift; 173 if (nbits & kmask) 181 b->x[j] = ULbits >> (ULbits - (nbits & kmask)); 218 nbits = fpi->nbits; 221 if (n > nbits) { 222 n -= nbits; [all...] |
/netbsd-current/external/gpl3/gcc.old/dist/gcc/ |
H A D | data-streamer.h | 104 bp_pack_value (struct bitpack_d *bp, bitpack_word_t val, unsigned nbits) argument 110 gcc_checking_assert (nbits == BITS_PER_BITPACK_WORD 111 || !(val & ~(((bitpack_word_t)1<<nbits)-1))); 115 if (pos + nbits > BITS_PER_BITPACK_WORD) 120 pos = nbits; 125 pos += nbits; 136 unsigned nbits) 139 bp_pack_value (bp, val.coeffs[i], nbits); 165 bp_unpack_value (struct bitpack_d *bp, unsigned nbits) argument 170 mask = (nbits 134 bp_pack_poly_value(struct bitpack_d *bp, const poly_int<NUM_POLY_INT_COEFFS, bitpack_word_t> &val, unsigned nbits) argument 193 bp_unpack_poly_value(struct bitpack_d *bp, unsigned nbits) argument 280 int nbits = floor_log2 (range) + 1; local 299 int nbits = floor_log2 (range) + 1; local [all...] |