mm+text+tests: three one-line residues the 2.1.0 review pass logged

The ATEM handoff's think_out called touch(0) twice on the hold branch
(harmless -- touch is edge-triggered -- but a merge artifact in an
otherwise surgical state machine); processor.cpp grew a second,
byte-identical Python-rounding helper 700 lines below the one it
already has, renamed only by an underscore; and the rewritten
RAD_TESTS_NO_CORE comment hand-enumerated eight tests while the set
below it names nine -- the comment now points at the set instead of
drifting from it again.

Standards axis of the 2.1.0 review pass, findings 6, 7 and 10.
This commit is contained in:
fl0l0u committed 2026-11-15 22:02:30 +00:00
1 parent c256342bc1
commit 97b4590761
4 files changed
+5 -10

No files matched your search

File renamed without changes.
+4 -8
View File
@@ -1238,10 +1238,6 @@ void resize_lanczos_torch(const Frame& in, int32_t w, int32_t h, Frame* out) {
resize_bicubic_impl(in, w, h, out, true, lanczos, 3.0);
}
/* Python's round(): the nearest integer, a tie to the even one. The default floating-point
* environment rounds that way, which nearbyint follows. */
static inline int64_t py_round(double x) { return (int64_t)std::nearbyint(x); }
void radio_size(int64_t w, int64_t h, const VisionConfig& c, int32_t* wp, int32_t* hp) {
const int64_t div = c.merge, lo = c.radio_min_patches;
const int64_t hi = c.radio_max_patches > 0 ? c.radio_max_patches : INT64_MAX;
@@ -1249,8 +1245,8 @@ void radio_size(int64_t w, int64_t h, const VisionConfig& c, int32_t* wp, int32_
const int64_t avail = std::max<int64_t>(std::min<int64_t>(budget, hi), lo);
/* round(x + 0.5): x + 1 rounded down for a fraction, and for a whole x, x or x + 1 by parity
* (Python's tie to even), which the reference's comment does not say but its code does. */
const int64_t ch = py_round((double)h / (double)c.patch + 0.5);
const int64_t cw = py_round((double)w / (double)c.patch + 0.5);
const int64_t ch = pyround((double)h / (double)c.patch + 0.5);
const int64_t cw = pyround((double)w / (double)c.patch + 0.5);
const double factor = std::min(std::sqrt((double)avail / (double)(ch * cw)), 1.0);
int64_t th = (int64_t)std::floor(factor * (double)ch);
int64_t tw = (int64_t)std::floor(factor * (double)cw);
@@ -1270,8 +1266,8 @@ void radio_size(int64_t w, int64_t h, const VisionConfig& c, int32_t* wp, int32_
void radio_video_size(int64_t w, int64_t h, const VisionConfig& c, int32_t* wp, int32_t* hp) {
const int64_t div = c.merge, target = c.radio_video_patches;
const double aspect = (double)w / (double)std::max<int64_t>(h, 1);
int64_t ph = std::max<int64_t>(py_round(std::sqrt((double)target / aspect)), 1);
int64_t pw = std::max<int64_t>(py_round(std::sqrt((double)target * aspect)), 1);
int64_t ph = std::max<int64_t>(pyround(std::sqrt((double)target / aspect)), 1);
int64_t pw = std::max<int64_t>(pyround(std::sqrt((double)target * aspect)), 1);
if (div > 1) {
const int64_t rh = ph % div, rw = pw % div;
const int64_t phu = ph + (rh ? div - rh : 0), pwu = pw + (rw ? div - rw : 0);
-1
View File
@@ -1316,7 +1316,6 @@ struct ReplyStream::Impl {
if (think_text) { msg.reasoning += think_pend; think_pend.clear(); }
return;
}
touch(0);
think_hold.append(p, n);
flush_think_hold(false);
}
+1 -1
View File
@@ -10,7 +10,7 @@
# fast every test with none of slow, gpu, oot and perf, set at the end of this file: the
# inner loop (`ctest --preset fast`, or `ctest -L fast`)
#
# arch_test, bailing_hybrid_arch_test, flint_arch_test, glm5next_test, museglimmer_test, nemotron35_test, spark25_arch_test and nemotronh_test do not link rad_core: they supply
# The tests named in RAD_TESTS_NO_CORE below do not link rad_core: they supply
# their own recording fake of the declare-phase C ABI (arch_fakes.h), so plugins are tested without
# depending on core/build/'s builder. With the archive linked, a new ABI call missing from the fake
# would pull in rad_builder.cpp.o and collide on every rad_decl_* symbol; without it the error is a