summaryrefslogtreecommitdiffstats
path: root/ml/ml.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-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]();