diff options
author | John Langford <jl@hunch.net> | 2010-04-20 07:20:21 +0400 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2010-04-20 07:20:21 +0400 |
commit | 82b18203557e8da5534cbe97053f7278ee27485a (patch) | |
tree | e7aa31f94f7e008223779f34ed94ac337914a67c /cache.cc | |
parent | 779c3433bc7819b082f8bb18ff10d74e51ae848b (diff) |
deleted debian-specific and tweaked n/skip generation so it made sense. Must debug further.
Diffstat (limited to 'cache.cc')
-rw-r--r-- | cache.cc | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -44,6 +44,7 @@ size_t read_cached_tag(io_buf& cache, example* ae) int read_cached_features(parser* p, void* ec) { example* ae = (example*)ec; + ae->sorted = p->sorted_cache; size_t mask = global.mask; io_buf* input = p->input; @@ -102,6 +103,8 @@ int read_cached_features(parser* p, void* ec) } size_t diff = f.weight_index >> 2; int32_t s_diff = ZigZagDecode(diff); + if (s_diff < 0) + ae->sorted = false; f.weight_index = last + s_diff; last = f.weight_index; f.weight_index = f.weight_index & mask; @@ -113,14 +116,6 @@ int read_cached_features(parser* p, void* ec) return total; } -int read_and_order_cached_features(parser* p, void* ec) -{ - int ret = read_cached_features(p,ec); - unique_sort_features(p,(example*)ec); - return ret; -} - - char* run_len_encode(char *p, size_t i) {// store an int 7 bits at a time. while (i >= 128) |