diff options
author | John Langford <jl@hunch.net> | 2013-12-25 02:16:14 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2013-12-25 02:16:14 +0400 |
commit | 1ff5894ad74f034473c44c8f82bca692e3e0d8a4 (patch) | |
tree | cacaff4f751ef2fb5e1b692ffb54eb3ea410f497 /vowpalwabbit/gd_mf.cc | |
parent | c95619bd2c56b346fe317b8fa134ee1c5b7c828e (diff) |
void* removal
Diffstat (limited to 'vowpalwabbit/gd_mf.cc')
-rw-r--r-- | vowpalwabbit/gd_mf.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vowpalwabbit/gd_mf.cc b/vowpalwabbit/gd_mf.cc index 727646f9..0e115720 100644 --- a/vowpalwabbit/gd_mf.cc +++ b/vowpalwabbit/gd_mf.cc @@ -40,7 +40,7 @@ float mf_inline_predict(vw& all, example* &ec) float linear_prediction = 0; // linear terms for (unsigned char* i = ec->indices.begin; i != ec->indices.end; i++) - GD::foreach_feature<vec_add>(all, &linear_prediction, ec->atomics[*i].begin, ec->atomics[*i].end); + GD::foreach_feature<float*,vec_add>(all, &linear_prediction, ec->atomics[*i].begin, ec->atomics[*i].end); // store constant + linear prediction // note: constant is now automatically added @@ -59,12 +59,12 @@ float mf_inline_predict(vw& all, example* &ec) // l^k is from index+1 to index+all.rank //float x_dot_l = sd_offset_add(weights, mask, ec->atomics[(int)(*i)[0]].begin, ec->atomics[(int)(*i)[0]].end, k); float x_dot_l = 0; - GD::foreach_feature<vec_add>(all, &x_dot_l, ec->atomics[(int)(*i)[0]].begin, ec->atomics[(int)(*i)[0]].end, k); + GD::foreach_feature<float*,vec_add>(all, &x_dot_l, ec->atomics[(int)(*i)[0]].begin, ec->atomics[(int)(*i)[0]].end, k); // x_r * r^k // r^k is from index+all.rank+1 to index+2*all.rank //float x_dot_r = sd_offset_add(weights, mask, ec->atomics[(int)(*i)[1]].begin, ec->atomics[(int)(*i)[1]].end, k+all.rank); float x_dot_r = 0; - GD::foreach_feature<vec_add>(all, &x_dot_r, ec->atomics[(int)(*i)[1]].begin, ec->atomics[(int)(*i)[1]].end, k+all.rank); + GD::foreach_feature<float*,vec_add>(all, &x_dot_r, ec->atomics[(int)(*i)[1]].begin, ec->atomics[(int)(*i)[1]].end, k+all.rank); prediction += x_dot_l * x_dot_r; |