/usr/include/music/distributor.hh is in libmusic-dev 1.0.7-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | /*
* This file is part of MUSIC.
* Copyright (C) 2009 INCF
*
* MUSIC is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* MUSIC is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MUSIC_DISTRIBUTOR_HH
// data_map.hh needs to be included first since it includes mpi.h.
// mpi.h must be included before other header files on BG/L
#include <music/data_map.hh>
#include <map>
#include <vector>
#include <music/FIBO.hh>
#include <music/interval_tree.hh>
namespace MUSIC {
class Distributor {
class Interval : public MUSIC::Interval {
public:
Interval (IndexInterval& interval);
bool operator< (const Interval& ref) const
{ return begin () < ref.begin (); }
// length field is stored overlapping the end field so that the
// interval information can be "recompiled" for space and time
// efficiency
int length () const { return end (); }
void setLength (int length) { setEnd (length); }
};
class IntervalCalculator : public IntervalTree<int, IndexInterval>::Action {
Interval& interval_;
int elementSize_;
public:
IntervalCalculator (Interval& interval, int elementSize)
: interval_ (interval), elementSize_ (elementSize) { };
void operator() (IndexInterval& indexInterval);
};
typedef std::vector<Interval> Intervals;
typedef std::map<FIBO*, Intervals> BufferMap;
DataMap* dataMap;
BufferMap buffers;
IntervalTree<int, IndexInterval>* buildTree ();
public:
// caller manages deallocation but guarantees existence
void configure (DataMap* dmap);
void initialize ();
void addRoutingInterval (IndexInterval i, FIBO* b);
void distribute ();
};
}
#define MUSIC_DISTRIBUTOR_HH
#endif
|