~ubuntu-branches/ubuntu/saucy/rheolef/saucy

« back to all changes in this revision

Viewing changes to skit/ptst/array_assembly_tst.cc

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Saramito
  • Date: 2011-02-08 10:00:06 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110208100006-jg8rarizvhdm8e82
Tags: 5.92-1
* New upstream release:
  - "rheolef" suffix added to all unix manuals (Closes: #607117)
  - minor source code fixes for g++-4.5 (Closes: #607184)
  - minor reference manual fix (Closes: #607038)
* debian/control: libboost-iostreams-dev dependency added, as required
  by the new upstream version.
 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
//
2
 
// assembly on process 0
3
 
// and send values to others via 
4
 
// data exchange
5
 
//
6
 
# include "rheolef/array.h"
7
 
using namespace rheolef;
8
 
using namespace std;
9
 
int main(int argc, char**argv)
10
 
{
11
 
  parallel process(argc, argv);
12
 
  array<Float> x(101, 0);
13
 
  if (parallel::process() == 0) {
14
 
    for (size_t par_i = 0; par_i < x.par_size(); par_i++) {
15
 
      x.par_set (par_i, 1000 + par_i + 0.5);
16
 
    }
17
 
  }
18
 
  x.assembly();
19
 
  pcout << x.par_size() << endl
20
 
        << x            << endl;
21
 
}