diff --git a/inst/tests/froll.Rraw b/inst/tests/froll.Rraw index eb8e2ddd4..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 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 diff --git a/src/froll.c b/src/froll.c index bccd2955f..526134095 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 sequentially took %.3fs\n"), "frollmedianFast", b, omp_get_wtime()-tic); // fill leading partial window for (int i=0; i