Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cache.h - github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e99deb573c1343cffe95512b16a8aa11385b5ef5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
Copyright (c) 2009 Yahoo! Inc.  All rights reserved.  The copyrights
embodied in the content of this file are licensed under the BSD
(revised) open source license
 */

#ifndef CACHE_H
#define CACHE_H

#include "parse_example.h"

const size_t int_size = 5;
const size_t char_size = 2;

char* run_len_decode(char *p, size_t& i);
char* run_len_encode(char *p, size_t i);

int read_cached_features(parser* p, void* ec);
void cache_tag(io_buf& cache, v_array<char> tag);
void cache_features(io_buf& cache, example* ae);
void output_int(io_buf& cache, size_t s);
void output_features(io_buf& cache, unsigned char index, feature* begin, feature* end);

#endif