You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//void frolladaptivemaxFast(const double *x, uint64_t nx, ans_t *ans, const int *k, double fill, bool narm, int hasnf, bool verbose); // does not exists as of now
//void frolladaptiveminFast(const double *x, uint64_t nx, ans_t *ans, const int *k, double fill, bool narm, int hasnf, bool verbose); // does not exists as of now
@@ -489,10 +489,10 @@ static inline void wmax(const double * restrict x, uint64_t o, int k, double * r
489
489
uint64_tii=o+i-k+1;
490
490
if (ISNAN(x[ii])) {
491
491
if (ISNA(x[ii])) {
492
-
error("internal error: frollmax reached untested branch of code, for now use frollmax algo='exact', please provide reproducible example of your frollmax usage to data.table github issue tracker\n"); // # nocov
492
+
internal_error(__func__, "frollmax reached untested branch of code, for now use frollmax algo='exact', please provide reproducible example of your frollmax usage to data.table github issue tracker"); // # nocov
493
493
//iww = ii; ww = NA_REAL;
494
494
} elseif (ISNA(ww)) {
495
-
error("internal error: frollmax reached untested branch of code, for now use frollmax algo='exact', please provide reproducible example of your frollmax usage to data.table github issue tracker\n"); // # nocov
495
+
internal_error(__func__, "frollmax reached untested branch of code, for now use frollmax algo='exact', please provide reproducible example of your frollmax usage to data.table github issue tracker"); // # nocov
496
496
// do nothing because w > x[i]: NA > NaN
497
497
} else { // no NA in window so NaN >= than any non-NA
498
498
iww=ii; ww=R_NaN;
@@ -514,7 +514,7 @@ static inline void wmax(const double * restrict x, uint64_t o, int k, double * r
514
514
* new max is used to continue outer single pass as long as new max index is not leaving the running window
515
515
* should scale well for bigger window size, may carry overhead for small window, needs benchmarking
bool*isnan=malloc(nx*sizeof(*isnan)); // isnan lookup - we use it to reduce ISNAN calls in nested loop
638
+
bool*isnan=malloc(sizeof(*isnan)*nx);// isnan lookup - we use it to reduce ISNAN calls in nested loop
639
639
if (!isnan) { // # nocov start
640
640
ansSetMsg(ans, 3, "%s: Unable to allocate memory for isnan", __func__); // raise error
641
641
return;
@@ -699,10 +699,10 @@ static inline void wmin(const double * restrict x, uint64_t o, int k, double * r
699
699
uint64_tii=o+i-k+1;
700
700
if (ISNAN(x[ii])) {
701
701
if (ISNA(x[ii])) {
702
-
error("internal error: frollmin reached untested branch of code, for now use frollmin algo='exact', please provide reproducible example of your frollmin usage to data.table github issue tracker\n"); // # nocov
702
+
internal_error(__func__, "frollmin reached untested branch of code, for now use frollmin algo='exact', please provide reproducible example of your frollmin usage to data.table github issue tracker"); // # nocov
703
703
//iww = ii; ww = NA_REAL;
704
704
} elseif (ISNA(ww)) {
705
-
error("internal error: frollmin reached untested branch of code, for now use frollmin algo='exact', please provide reproducible example of your frollmin usage to data.table github issue tracker\n"); // # nocov
705
+
internal_error(__func__, "frollmin reached untested branch of code, for now use frollmin algo='exact', please provide reproducible example of your frollmin usage to data.table github issue tracker"); // # nocov
706
706
// do nothing because w > x[i]: NA > NaN
707
707
} else { // no NA in window so NaN >= than any non-NA
708
708
iww=ii; ww=R_NaN;
@@ -720,7 +720,7 @@ static inline void wmin(const double * restrict x, uint64_t o, int k, double * r
0 commit comments