diff options
author | John Langford <jl@hunch.net> | 2013-11-22 01:08:34 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2013-11-22 01:08:34 +0400 |
commit | 7366881824568aa3c39f5a242188b320e830ac48 (patch) | |
tree | a849897d4d0333b3cb1fd5f50d9d0f3374d8843e /vowpalwabbit/vw.h | |
parent | 27bdfac1eb7fed307b71e0cfc540a2180920d659 (diff) |
bugfix from Weizhu Chen
Diffstat (limited to 'vowpalwabbit/vw.h')
-rw-r--r-- | vowpalwabbit/vw.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vowpalwabbit/vw.h b/vowpalwabbit/vw.h index 51b50321..56d1ae1d 100644 --- a/vowpalwabbit/vw.h +++ b/vowpalwabbit/vw.h @@ -93,10 +93,10 @@ namespace VW { } inline float get_weight(vw& all, uint32_t index, uint32_t offset) - { return all.reg.weight_vector[((index * all.reg.stride) & all.reg.weight_mask) + offset];} + { return all.reg.weight_vector[((index * all.reg.stride + offset) & all.reg.weight_mask)];} inline void set_weight(vw& all, uint32_t index, uint32_t offset, float value) - { all.reg.weight_vector[((index * all.reg.stride) & all.reg.weight_mask) + offset] = value;} + { all.reg.weight_vector[((index * all.reg.stride + offset) & all.reg.weight_mask)] = value;} inline uint32_t num_weights(vw& all) { return (uint32_t)all.length();} |