/* $Id: Printer.h 1135 2006-09-06 07:53:02Z olau $ */

/* Copyright (C) 2006 Oliver Lau <ola@ctmagazin.de>, Heise Zeitschriften Verlag */

#ifndef __PRINTER_H_
#define __PRINTER_H_

#include <vector>

#include "tbb/blocked_range.h"

#include "../tbb_demos.h"

using namespace std;
using namespace tbb;

class Printer {
  int * const m_v;
public:
  Printer(int v[]) :  m_v(v) {}
  void operator() (const blocked_range<size_t>& r) const
  {
    for (size_t i = r.begin(); i != r.end(); ++i)
      cout << m_v[i];
  }
};


#endif /* __PRINTER_H_ */
