From d36570f862d141e33c6fadb2a4f9173716cdaa34 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Sun, 14 Dec 2025 21:53:45 -0800 Subject: [PATCH 1/4] Improve translation-readiness of string with subclause --- src/froll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/froll.c b/src/froll.c index bccd2955f..16bc97a64 100644 --- a/src/froll.c +++ b/src/froll.c @@ -1625,7 +1625,8 @@ void frollmedianFast(const double *x, uint64_t nx, ans_t *ans, int k, double fil setlinks(&o[j*k], &next[j*(k+1)], &prev[j*(k+1)], tail); } if (verbose) - snprintf(end(ans->message[0]), 500, _("%s: finding order and initializing links for %d blocks %stook %.3fs\n"), "frollmedianFast", b, par ? "in parallel " : "", omp_get_wtime()-tic); + snprintf(end(ans->message[0]), 500, par ? _("%s: finding order and initializing links for %d blocks in parallel took %.3fs\n") + : _("%s: finding order and initializing links for %d blocks in serial took %.3fs\n"), "frollmedianFast", b, omp_get_wtime()-tic); // fill leading partial window for (int i=0; i Date: Sun, 14 Dec 2025 22:30:20 -0800 Subject: [PATCH 2/4] 'in serial' in expected message --- inst/tests/froll.Rraw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/tests/froll.Rraw b/inst/tests/froll.Rraw index eb8e2ddd4..97f0282e0 100644 --- a/inst/tests/froll.Rraw +++ b/inst/tests/froll.Rraw @@ -1529,7 +1529,7 @@ test(6004.013, frollmedian(1:8, 4), c(NA, NA, NA, 2.5, 3.5, 4.5, 5.5, 6.5), notO test(6004.014, frollmedian(c(NA,2:9), 3), as.double(c(NA,NA,NA,3:8)), notOutput="running implementation as described in the paper by Jukka Suomela, for uneven window size, length of input a multiple of window size, no NAs in the input data", output="NAs detected") test(6004.015, frollmedian(c(1,2,3,4,NA,6), 3), c(NA, NA, 2, 3, NA, NA), output="NAs detected, fall back to frollmedianExact\nfrollmedianExact: running in parallel for input length 6, window 3, hasnf 1, narm 0") test(6004.016, frollmedian(c(1,2,3,4,5,6), 3), c(NA, NA, 2, 3, 4, 5), output="sequentially as there is only single rolling computation.*finding order and initializing links for 2 blocks in parallel took") -test(6004.017, frollmedian(c(1,2,3,4,5,6), c(3,3)), list(c(NA, NA, 2, 3, 4, 5), c(NA, NA, 2, 3, 4, 5)), output="in parallel.*finding order and initializing links for 2 blocks took", notOutput="finding order and initializing links for 2 blocks in parallel took") +test(6004.017, frollmedian(c(1,2,3,4,5,6), c(3,3)), list(c(NA, NA, 2, 3, 4, 5), c(NA, NA, 2, 3, 4, 5)), output="in parallel.*finding order and initializing links for 2 blocks in serial took", notOutput="finding order and initializing links for 2 blocks in parallel took") options(datatable.verbose=FALSE) test(6004.021, frollmedian(c(1,2,3,4,NA,6), 3, has.nf=FALSE), c(NA, NA, 2, 3, 4, NA)) ## incorrect results due to misuse of has.nf=T documented test(6004.022, frollmedian(c(1,2,3,4,NA,6), 3, algo="exact", has.nf=FALSE), c(NA, NA, 2, 3, 4, NA)) ## incorrect results due to misuse of has.nf=T documented From e8ab7e4c80e9f5213de64502d9f3a2b03c700f47 Mon Sep 17 00:00:00 2001 From: Benjamin Schwendinger <52290390+ben-schwen@users.noreply.github.com> Date: Mon, 22 Dec 2025 12:50:23 +0100 Subject: [PATCH 3/4] add Jans comment --- src/froll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/froll.c b/src/froll.c index 16bc97a64..526134095 100644 --- a/src/froll.c +++ b/src/froll.c @@ -1626,7 +1626,7 @@ void frollmedianFast(const double *x, uint64_t nx, ans_t *ans, int k, double fil } if (verbose) snprintf(end(ans->message[0]), 500, par ? _("%s: finding order and initializing links for %d blocks in parallel took %.3fs\n") - : _("%s: finding order and initializing links for %d blocks in serial took %.3fs\n"), "frollmedianFast", b, omp_get_wtime()-tic); + : _("%s: finding order and initializing links for %d blocks sequentially took %.3fs\n"), "frollmedianFast", b, omp_get_wtime()-tic); // fill leading partial window for (int i=0; i Date: Mon, 22 Dec 2025 12:53:29 +0100 Subject: [PATCH 4/4] also update test --- inst/tests/froll.Rraw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/tests/froll.Rraw b/inst/tests/froll.Rraw index 97f0282e0..04398aaee 100644 --- a/inst/tests/froll.Rraw +++ b/inst/tests/froll.Rraw @@ -1529,7 +1529,7 @@ test(6004.013, frollmedian(1:8, 4), c(NA, NA, NA, 2.5, 3.5, 4.5, 5.5, 6.5), notO test(6004.014, frollmedian(c(NA,2:9), 3), as.double(c(NA,NA,NA,3:8)), notOutput="running implementation as described in the paper by Jukka Suomela, for uneven window size, length of input a multiple of window size, no NAs in the input data", output="NAs detected") test(6004.015, frollmedian(c(1,2,3,4,NA,6), 3), c(NA, NA, 2, 3, NA, NA), output="NAs detected, fall back to frollmedianExact\nfrollmedianExact: running in parallel for input length 6, window 3, hasnf 1, narm 0") test(6004.016, frollmedian(c(1,2,3,4,5,6), 3), c(NA, NA, 2, 3, 4, 5), output="sequentially as there is only single rolling computation.*finding order and initializing links for 2 blocks in parallel took") -test(6004.017, frollmedian(c(1,2,3,4,5,6), c(3,3)), list(c(NA, NA, 2, 3, 4, 5), c(NA, NA, 2, 3, 4, 5)), output="in parallel.*finding order and initializing links for 2 blocks in serial took", notOutput="finding order and initializing links for 2 blocks in parallel took") +test(6004.017, frollmedian(c(1,2,3,4,5,6), c(3,3)), list(c(NA, NA, 2, 3, 4, 5), c(NA, NA, 2, 3, 4, 5)), output="in parallel.*finding order and initializing links for 2 blocks sequentially took", notOutput="finding order and initializing links for 2 blocks in parallel took") options(datatable.verbose=FALSE) test(6004.021, frollmedian(c(1,2,3,4,NA,6), 3, has.nf=FALSE), c(NA, NA, 2, 3, 4, NA)) ## incorrect results due to misuse of has.nf=T documented test(6004.022, frollmedian(c(1,2,3,4,NA,6), 3, algo="exact", has.nf=FALSE), c(NA, NA, 2, 3, 4, NA)) ## incorrect results due to misuse of has.nf=T documented