Paraperm
|
00001 #ifndef PARAPERM_PARAPERM_H 00002 #define PARAPERM_PARAPERM_H 00003 00004 #include <mpi.h> 00005 #include <cstdint> 00006 #include <vector> 00007 #include <boost/noncopyable.hpp> 00008 00009 namespace paraperm 00010 { 00011 template <typename T = uintmax_t> 00012 class Paraperm : boost::noncopyable 00013 { 00014 public: 00015 typedef T value_type; 00016 typedef std::vector<T> vector_type; 00017 00018 Paraperm(); 00019 ~Paraperm(); 00020 00021 void generate(MPI_Comm comm, T n); 00022 00023 const vector_type& perm() const; 00024 T pos() const; 00025 T count() const; 00026 00027 private: 00028 struct Impl; 00029 Impl* pimpl_; 00030 }; 00031 } 00032 00033 #include "impl/Paraperm.h" 00034 00035 #endif