.\" .de Id .. .de Sp .if n .sp .if t .sp 0.4 .. .TH distributor 2rheolef "rheolef-7.0" "rheolef-7.0" "rheolef-7.0" .\" label: /*Class:distributor .SH NAME \fBdistributor\fP - data distribution table (rheolef-7.0) .SH SYNOPSIS Used by "disarray"(1), "asr"(1) and "csr"(1). and such classes that distribute data as chunk. .\" skip start:SEE ALSO: .\" skip start:AUTHORS: .\" skip start:DATE: .\" END .SH IMPLEMENTATION .\" begin_example .Sp .nf class distributor : public Vector::size_type> { public: // typedefs: typedef std::allocator::size_type size_type; typedef Vector _base; typedef _base::iterator iterator; typedef _base::const_iterator const_iterator; typedef int tag_type; typedef communicator communicator_type; // constants: static const size_type decide = size_type(-1); // allocators/deallocators: distributor( size_type dis_size = 0, const communicator_type& c = communicator_type(), size_type loc_size = decide); distributor(const distributor&); ~distributor(); void resize( size_type dis_size = 0, const communicator_type& c = communicator_type(), size_type loc_size = decide); // accessors: const communicator_type& comm() const; /// global and local sizes size_type dis_size () const; /// current process id size_type process () const; /// number of processes size_type n_process () const; /// find iproc associated to a global index dis_i: CPU=log(nproc) size_type find_owner (size_type dis_i) const; /// global index range and local size owned by ip-th process size_type first_index (size_type ip) const; size_type last_index (size_type ip) const; size_type size (size_type ip) const; /// global index range and local size owned by current process size_type first_index () const; size_type last_index () const; size_type size () const; /// true when dis_i in [first_index(ip):last_index(ip)[ bool is_owned (size_type dis_i, size_type ip) const; // the same with ip=current process bool is_owned (size_type dis_i) const; /// returns a new tag static tag_type get_new_tag(); // comparators: bool operator== (const distributor&) const; bool operator!= (const distributor&) const; // data: protected: communicator_type _comm; }; .Sp .fi .\" end_example .SH COPYRIGHT Copyright (C) 2000-2018 Pierre Saramito GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.