distributor(4rheolef)

πŸ“¦
version 7.2 Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

distributor β€” memory distribution table (rheolef-7.2) 🫢

ok so quick housekeeping bestie: this one lives in the 4rheolef section of the manual, and it's a whole vibe. Let's get into it ✨


🌸 DESCRIPTION 🌸

So like. You've got an array size, right? And this class is the one that decides which process gets to own which part of a distributed memory array β€” you know, the kind of thing like disarray(4). It's giving group project where everyone gets assigned their own little chunk and nobody's fighting over it πŸ’…


πŸŽ€ EXAMPLE πŸŽ€

Here's the whole thing in action, look at her:

    distributor ownership (100);

Iconic. No notes. πŸ‘‘


πŸ’€ TODO πŸ’€

Not me pointing out the messy part πŸ™ˆ so there's an ambiguous use of size() and dis_size() going on in here, and we gotta be honest about it:

  • size() refers to n_process()
  • size(iproc) and dis_size() refer to the size of the index ranges

So like... that's confusing, right? The verdict is: size() should be avoided, and we should be using n_process() instead. fr fr. Consider that your PSA for the day 🫢


πŸ› οΈ IMPLEMENTATION πŸ› οΈ

This documentation has been generated from file linalg/lib/distributor.h β€” shoutout to the source file, she's the real main character here πŸ’…

class distributor : public Vector<std::allocator<int>::size_type> {
public:

// typedefs:

        typedef std::allocator<int>::size_type size_type;
        typedef Vector<size_type>              _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;

        size_type dis_size () const;

        size_type process () const;

        size_type n_process () const;

        size_type find_owner (size_type dis_i) const;

        size_type first_index (size_type iproc) const;
        size_type last_index (size_type iproc) const;
        size_type size (size_type iproc) const;

        size_type first_index () const;
        size_type last_index () const;
        size_type size () const;

        bool is_owned (size_type dis_i, size_type iproc) const;

        // the same with ip=current process
        bool is_owned (size_type dis_i) const;

        static tag_type get_new_tag();

// comparators:

        bool operator== (const distributor&) const;
        bool operator!= (const distributor&) const;

};

✨ AUTHOR ✨

Pierre Saramito <Pierre.Saramito@imag.fr> β€” thank you for your service king πŸ«‘πŸ’œ


Copyright (C) 2000-2018 Pierre Saramito <Pierre.Saramito@imag.fr>

GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (yes, that means no warranty bestie, read it and weep 😭)


and that's the whole page, bestie πŸ¦‹ this one came from rheolef, Version 7.2, filed under distributor(4rheolef) β€” go forth and distribute those arrays responsibly, ily πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from