Skip to content

Commit

Permalink
fix bug on scikit max_mem_size
Browse files Browse the repository at this point in the history
  • Loading branch information
QinbinLi committed Jul 14, 2018
1 parent 9fae827 commit 07c812e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/thundersvm/thundersvm-scikit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ extern "C" {
param_cmd.epsilon = (float_type)tol;
param_cmd.probability = probability;
if(max_mem_size != -1)
param_cmd.max_mem_size = max_mem_size;
param_cmd.max_mem_size = static_cast<size_t>(max(max_mem_size, 0)) << 20;
if(weight_size != 0) {
param_cmd.nr_weight = weight_size;
param_cmd.weight = (float_type *) malloc(weight_size * sizeof(float_type));
Expand Down Expand Up @@ -201,7 +201,7 @@ extern "C" {
param_cmd.epsilon = (float_type)tol;
param_cmd.probability = probability;
if(max_mem_size != -1)
param_cmd.max_mem_size = max_mem_size;
param_cmd.max_mem_size = static_cast<size_t>(max(max_mem_size, 0)) << 20;
if(weight_size != 0) {
param_cmd.nr_weight = weight_size;
param_cmd.weight = (float_type *) malloc(weight_size * sizeof(float_type));
Expand Down

0 comments on commit 07c812e

Please sign in to comment.