Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Langford <jl@nyclamp.(none)>2014-01-08 20:04:26 +0400
committerJohn Langford <jl@nyclamp.(none)>2014-01-08 20:04:26 +0400
commit9be3f55aa15c22b8279e801f7a69eeba1ba2644b (patch)
tree0c7676eb3718e0d34f9b6ad99c849eb0e15b166f /vowpalwabbit/gd_mf.cc
parent18c929e512dd809f57ff4250219e61d07a2d9699 (diff)
more void* removal
Diffstat (limited to 'vowpalwabbit/gd_mf.cc')
-rw-r--r--vowpalwabbit/gd_mf.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/vowpalwabbit/gd_mf.cc b/vowpalwabbit/gd_mf.cc
index 65d30d2e..5e8ef7a0 100644
--- a/vowpalwabbit/gd_mf.cc
+++ b/vowpalwabbit/gd_mf.cc
@@ -209,9 +209,9 @@ void mf_print_audit_features(vw& all, example* ec, size_t offset)
mf_print_offset_features(all, ec, offset);
}
- void save_load(void* d, io_buf& model_file, bool read, bool text)
+ void save_load(gdmf* d, io_buf& model_file, bool read, bool text)
{
- vw* all = ((gdmf*)d)->all;
+ vw* all = d->all;
uint32_t length = 1 << all->num_bits;
uint32_t stride = all->reg.stride;
@@ -294,7 +294,8 @@ void end_pass(gdmf* d)
{
gdmf* data = (gdmf*)calloc(1,sizeof(gdmf));
data->all = &all;
- learner* l = new learner(data, learn, predict, save_load, all.reg.stride);
+ learner* l = new learner(data, learn, predict, all.reg.stride);
+ l->set_save_load<gdmf,save_load>();
l->set_end_pass<gdmf,end_pass>();
return l;