FeatureQueue.h 453 Bytes
Newer Older
mayong's avatar
mayong committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

#ifndef FEATUREQUEUE_H
#define FEATUREQUEUE_H

#include "Tensor.h"
#include <queue>
#include <stdint.h>
using namespace std;


class FeatureQueue {
  private:
    queue<Tensor<float> *> feature_queue;
    Tensor<float> *buff;
    int buff_idx;
    int window_size;

  public:
    FeatureQueue();
    ~FeatureQueue();
    void reinit(int size);
    void reset();
    void push(float *din, int flag);
    Tensor<float> *pop();
    int size();
};

#endif