diff options
author | John Langford <jl@hunch.net> | 2014-04-17 01:01:02 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2014-04-17 01:01:02 +0400 |
commit | 209464f4bffbca471da67c47cd7e1f0b75486427 (patch) | |
tree | 21c313a73523ad2b935cdb008fc9c3e6c5ca54a3 /vowpalwabbit/vw.h | |
parent | 64c949aeb0e93087f0df308366aa985567baa94a (diff) |
change stride to stride_shift
Diffstat (limited to 'vowpalwabbit/vw.h')
-rw-r--r-- | vowpalwabbit/vw.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vowpalwabbit/vw.h b/vowpalwabbit/vw.h index 207809d1..eabddba7 100644 --- a/vowpalwabbit/vw.h +++ b/vowpalwabbit/vw.h @@ -95,16 +95,16 @@ namespace VW { } inline float get_weight(vw& all, uint32_t index, uint32_t offset) - { return all.reg.weight_vector[((index * all.reg.stride + offset) & all.reg.weight_mask)];} + { return all.reg.weight_vector[(((index << all.reg.stride_shift) + 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 + offset) & all.reg.weight_mask)] = value;} + { all.reg.weight_vector[(((index << all.reg.stride_shift) + offset) & all.reg.weight_mask)] = value;} inline uint32_t num_weights(vw& all) { return (uint32_t)all.length();} inline uint32_t get_stride(vw& all) - { return (uint32_t)all.reg.stride;} + { return (uint32_t)(1 << all.reg.stride_shift);} inline void update_dump_interval(vw& all) { if (all.progress_add) { |