10 #ifndef ZOLTAN2_DIRECTORY_COMM_H_
11 #define ZOLTAN2_DIRECTORY_COMM_H_
13 #include <Teuchos_CommHelpers.hpp>
16 #include <Teuchos_ArrayRCP.hpp>
30 void print(
const std::string& headerMessage)
const;
77 Teuchos::RCP<const Teuchos::Comm<int> >
comm;
79 Teuchos::ArrayRCP<Teuchos::RCP<Teuchos::CommRequest<int> > >
request;
91 const Teuchos::ArrayRCP<int> &assign,
92 Teuchos::RCP<
const Teuchos::Comm<int> > comm,
99 const Teuchos::ArrayRCP<char> &send_data,
101 Teuchos::ArrayRCP<char> &recv_data);
105 const Teuchos::ArrayRCP<char> &send_data,
107 const Teuchos::ArrayRCP<int> &sizes,
108 Teuchos::ArrayRCP<char> &recv_data);
116 int resize(
const Teuchos::ArrayRCP<int> &sizes,
int tag,
117 int *sum_recv_sizes);
121 const Teuchos::ArrayRCP<int> &sizes,
int tag,
int *sum_recv_sizes);
124 const Teuchos::ArrayRCP<char> &send_data,
126 Teuchos::ArrayRCP<char> &recv_data);
129 const Teuchos::ArrayRCP<char> &send_data,
131 Teuchos::ArrayRCP<char> &recv_data);
134 const Teuchos::ArrayRCP<char> &send_data,
136 Teuchos::ArrayRCP<char> &recv_data);
138 int sort_ints(Teuchos::ArrayRCP<int> &vals_sort, Teuchos::ArrayRCP<int> &vals_other);
140 int invert_map(
const Teuchos::ArrayRCP<int> &lengths_to,
141 const Teuchos::ArrayRCP<int> &procs_to,
int nsends,
int self_msg,
142 Teuchos::ArrayRCP<int> &lengths_from, Teuchos::ArrayRCP<int> &procs_from,
143 int *pnrecvs,
int my_proc,
int nprocs,
int out_of_mem,
int tag,
144 Teuchos::RCP<
const Teuchos::Comm<int> > comm);
146 int exchange_sizes(
const Teuchos::ArrayRCP<int> &sizes_to,
147 const Teuchos::ArrayRCP<int> &procs_to,
int nsends,
148 int self_msg, Teuchos::ArrayRCP<int> &sizes_from,
149 const Teuchos::ArrayRCP<int> &procs_from,
150 int nrecvs,
int *total_recv_size,
int my_proc,
int tag,
151 Teuchos::RCP<
const Teuchos::Comm<int> > comm);
155 int create_reverse_plan(
int tag,
const Teuchos::ArrayRCP<int> &sizes);
157 Teuchos::RCP<const Teuchos::Comm<int> > comm_;
167 #ifndef MPI_RECV_LIMIT
176 #define MPI_RECV_LIMIT 0
~Zoltan2_Directory_Plan()
Teuchos::ArrayRCP< int > procs_from
Teuchos::ArrayRCP< int > indices_to
Teuchos::ArrayRCP< int > lengths_to
Teuchos::ArrayRCP< char > recv_buff
Teuchos::ArrayRCP< int > indices_from_ptr
Teuchos::ArrayRCP< int > starts_from
void print(const std::string &headerMessage) const
Teuchos::ArrayRCP< int > procs_to
int do_reverse(int tag, const Teuchos::ArrayRCP< char > &send_data, int nbytes, const Teuchos::ArrayRCP< int > &sizes, Teuchos::ArrayRCP< char > &recv_data)
Teuchos::ArrayRCP< char > getRecvBuff() const
~Zoltan2_Directory_Comm()
Teuchos::ArrayRCP< int > starts_to
int get_plan_forward_recv_size() const
Teuchos::ArrayRCP< int > indices_to_ptr
Teuchos::ArrayRCP< int > indices_from
Teuchos::ArrayRCP< int > starts_from_ptr
Teuchos::ArrayRCP< int > sizes_from
Teuchos::ArrayRCP< int > sizes_to
int do_forward(int tag, const Teuchos::ArrayRCP< char > &send_data, int nbytes, Teuchos::ArrayRCP< char > &recv_data)
Teuchos::ArrayRCP< Teuchos::RCP< Teuchos::CommRequest< int > > > request
int resize(const Teuchos::ArrayRCP< int > &sizes, int tag, int *sum_recv_sizes)
Teuchos::ArrayRCP< int > lengths_from
Teuchos::ArrayRCP< int > sizes
Zoltan2_Directory_Plan * plan_reverse
Teuchos::RCP< const Teuchos::Comm< int > > comm
Zoltan2_Directory_Comm(int nvals, const Teuchos::ArrayRCP< int > &assign, Teuchos::RCP< const Teuchos::Comm< int > > comm, int tag)
Teuchos::ArrayRCP< int > starts_to_ptr
void getInvertedValues(Zoltan2_Directory_Plan *from)