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/lrq.cc | |
parent | 64c949aeb0e93087f0df308366aa985567baa94a (diff) |
change stride to stride_shift
Diffstat (limited to 'vowpalwabbit/lrq.cc')
-rw-r--r-- | vowpalwabbit/lrq.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vowpalwabbit/lrq.cc b/vowpalwabbit/lrq.cc index 05e141ee..3263aa1d 100644 --- a/vowpalwabbit/lrq.cc +++ b/vowpalwabbit/lrq.cc @@ -105,7 +105,7 @@ namespace LRQ { { if (! do_dropout || cheesyrbit (lrq.seed)) { - uint32_t lwindex = (uint32_t)(lindex + n * all.reg.stride); + uint32_t lwindex = (uint32_t)(lindex + (n << all.reg.stride_shift)); float* lw = &all.reg.weight_vector[lwindex & all.reg.weight_mask]; @@ -122,7 +122,7 @@ namespace LRQ { // NB: ec.ft_offset added by base learner float rfx = rf->x; size_t rindex = rf->weight_index; - uint32_t rwindex = (uint32_t)(rindex + n * all.reg.stride); + uint32_t rwindex = (uint32_t)(rindex + (n << all.reg.stride_shift)); feature lrq; lrq.x = scale * *lw * lfx * rfx; |