/usr/include/vtk-7.1/vtkdiy/reduce-operations.hpp is in libvtk7-dev 7.1.1+dfsg1-2.
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 | #ifndef DIY_REDUCE_OPERATIONS_HPP
#define DIY_REDUCE_OPERATIONS_HPP
#include "reduce.hpp"
#include "partners/swap.hpp"
#include "detail/reduce/all-to-all.hpp"
namespace diy
{
/**
* \ingroup Communication
* \brief all to all reduction
*
*/
template<class Op>
void
all_to_all(Master& master, //!< block owner
const Assigner& assigner, //!< global block locator (maps gid to proc)
const Op& op, //!< user-defined operation called to enqueue and dequeue items
int k = 2 //!< reduction fanout
)
{
RegularDecomposer<DiscreteBounds> decomposer(1, interval(0,assigner.nblocks()-1), assigner.nblocks());
RegularSwapPartners partners(decomposer, k, false);
reduce(master, assigner, partners, detail::AllToAllReduce<Op>(op, assigner), detail::SkipIntermediate(partners.rounds()));
}
}
#endif
|