dataflow_producer-snippet.h 201 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
template <typename T>
class Producer {
 public:
  explicit Producer(int seed) : seed_(seed) {}
  void Run(T& x) {
    // produce a new value x
    x = SimpleRand(seed_);
  }

 private:
  int seed_;
};