Paraperm
 All Classes Namespaces
Paraper Class Reference

Parallel random permutaiton generator class. More...


Detailed Description

Parallel random permutaiton generator class.

Template Parameters:
TInteger data type for permutation elements. Default value is uintmax_t.

The algorithm is described in detail in [1].

The intended usage of the class consists of the following steps running within all MPI processes:

  1. An instance of the class is defined:
  2. The MPI communicator is passed to instance:
     paraper.set_communicator(MPI_COMM_WORLD);
    
  3. Random permutation of size elements is generated:
     paraper.generate(size);
    
  4. Internal communicators are freed:
     paraper.free_communicator();
    
  5. Permutation elements within all MPI processes are available as follows:
     const paraper::Paraper<>::vector_type& = paraper.elements();
     paraper::Paraper<>::value_type fisrt = paraper.first(); // position in the global permutation array
     paraper::Paraper<>::value_type count = paraper.count(); // number of local permutaion elements
    

The documentation for this class was generated from the following file:
 All Classes Namespaces