Lines Matching defs:nb
687 test_bound(int nb)
689 if (nb > SC_MAX_NBITS) {
691 std::sprintf( msg, "test_bound( int nb ) : "
692 "nb = %d > SC_MAX_NBITS = %d is not valid",
693 nb, SC_MAX_NBITS );
774 trim(small_type added, int nb, int nd, sc_digit *d)
777 assert((nb > 0) && (nd > 0) && (d != NULL));
780 d[nd - 1] &= one_and_ones(bit_ord(nb - 1) + added);
788 small_type s, int nb, int nd, sc_digit *d)
792 trim(added, nb, nd, d);
815 trim_signed(int nb, int nd, sc_digit *d)
818 assert((nb > 0) && (nd > 0) && (d != NULL));
821 d[nd - 1] &= one_and_ones(bit_ord(nb - 1) + 1);
829 convert_signed_2C_to_SM(int nb, int nd, sc_digit *d)
833 assert((nb > 0) && (nd > 0) && (d != NULL));
838 int xnb = bit_ord(nb - 1) + 1;
865 convert_signed_SM_to_2C_to_SM(small_type s, int nb, int nd, sc_digit *d)
868 return convert_signed_2C_to_SM(nb, nd, d);
875 convert_signed_SM_to_2C_trimmed(small_type s, int nb, int nd, sc_digit *d)
877 convert_SM_to_2C_trimmed(1, s, nb, nd, d);
898 trim_unsigned(int nb, int nd, sc_digit *d)
901 assert((nb > 0) && (nd > 0) && (d != NULL));
904 d[nd - 1] &= one_and_ones(bit_ord(nb - 1));
912 convert_unsigned_2C_to_SM(int nb, int nd, sc_digit *d)
914 trim_unsigned(nb, nd, d);
924 convert_unsigned_SM_to_2C_to_SM(small_type s, int nb, int nd, sc_digit *d)
927 return convert_unsigned_2C_to_SM(nb, nd, d);
934 convert_unsigned_SM_to_2C_trimmed(small_type s, int nb, int nd, sc_digit *d)
936 convert_SM_to_2C_trimmed(0, s, nb, nd, d);