Chi-Tech
ParallelVector.cc
Go to the documentation of this file.
1#include "ParallelVector.h"
2
3#include "mpi/chi_mpi_utils.h"
4
5namespace chi_math
6{
7
9 uint64_t global_size,
10 const MPI_Comm communicator)
11 : local_size_(local_size),
12 global_size_(global_size),
13 location_id_(chi_mpi_utils::GetLocationID(communicator)),
14 process_count_(chi_mpi_utils::GetProcessCount(communicator)),
15 comm_(communicator)
16{
17}
18
20 : local_size_(other.local_size_),
21 global_size_(other.global_size_),
22 location_id_(other.location_id_),
23 process_count_(other.process_count_),
24 comm_(other.comm_)
25{
26}
27
29 : local_size_(other.local_size_),
30 global_size_(other.global_size_),
31 location_id_(other.location_id_),
32 process_count_(other.process_count_),
33 comm_(other.comm_)
34{
35}
36
37} // namespace chi_math
ParallelVector(uint64_t local_size, uint64_t global_size, MPI_Comm communicator)
int GetProcessCount(MPI_Comm mpi_comm)
int GetLocationID(MPI_Comm mpi_comm)
Definition: chi_mpi_utils.cc:7