summaryrefslogtreecommitdiffstats
path: root/ml/ml.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-14 19:20:33 +0000
commit6cf8f2d5174a53f582e61d715edbb88d6e3367cc (patch)
tree78cec0fd8d09c4a6a052461d42f4b2be3af6d396 /ml/ml.cc
parentAdding upstream version 1.39.1. (diff)
downloadnetdata-6cf8f2d5174a53f582e61d715edbb88d6e3367cc.tar.xz
netdata-6cf8f2d5174a53f582e61d715edbb88d6e3367cc.zip
Adding upstream version 1.40.0.upstream/1.40.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/ml.cc')
-rw-r--r--ml/ml.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ml/ml.cc b/ml/ml.cc
index 34f2b93b..a5f0fa06 100644
--- a/ml/ml.cc
+++ b/ml/ml.cc
@@ -1565,7 +1565,7 @@ void ml_init()
for (size_t idx = 0; idx != Cfg.num_training_threads; idx++) {
ml_training_thread_t *training_thread = &Cfg.training_threads[idx];
- size_t max_elements_needed_for_training = Cfg.max_train_samples * (Cfg.lag_n + 1);
+ size_t max_elements_needed_for_training = (size_t) Cfg.max_train_samples * (size_t) (Cfg.lag_n + 1);
training_thread->training_cns = new calculated_number_t[max_elements_needed_for_training]();
training_thread->scratch_training_cns = new calculated_number_t[max_elements_needed_for_training]();