Implemented more efficient and memory savvy RSI

This commit is contained in:
Luca Deri
2021-02-05 12:38:41 +01:00
parent 60b58dbd67
commit 8dd7716ae5
4 changed files with 66 additions and 26 deletions
+2 -2
View File
@@ -3699,12 +3699,12 @@ void rsiUnitTest() {
};
u_int i, n = sizeof(v) / sizeof(unsigned int);
ndpi_init_rsi(&s, 8);
assert(ndpi_alloc_rsi(&s, 8) == 0);
for(i=0; i<n; i++) {
float rsi = ndpi_rsi_add_value(&s, v[i]);
#if DEBUG
#if 0
printf("%2d) RSI = %f\n", i, rsi);
#endif
}