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@hunch.net>2014-04-17 01:01:02 +0400
committerJohn Langford <jl@hunch.net>2014-04-17 01:01:02 +0400
commit209464f4bffbca471da67c47cd7e1f0b75486427 (patch)
tree21c313a73523ad2b935cdb008fc9c3e6c5ca54a3 /vowpalwabbit/lrq.cc
parent64c949aeb0e93087f0df308366aa985567baa94a (diff)
change stride to stride_shift
Diffstat (limited to 'vowpalwabbit/lrq.cc')
-rw-r--r--vowpalwabbit/lrq.cc4
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;