#include <ctime>
#include <iostream>
#include "ft_merge.h"
#include "mpi.h"
Go to the source code of this file.
|
#define | ENABLE_MPI 1 |
|
#define | MPI_COMM_TYPE MPI_Comm |
|
#define | AU_WTIME_TYPE double |
|
#define | AU_WTIME MPI_Wtime() |
|
#define | MPI_COMM_WORLD_DEFAULT MPI_COMM_WORLD |
|
#define | MPI_INFO_NULL_DEFAULT MPI_INFO_NULL |
|
#define | AU_MPI_Datatype MPI_Datatype |
|
#define | AU_MPI_Op MPI_Op |
|
#define | MPI_INIT(argc, argv, au_mpi_comm_global, au_mpi_rank_global, au_mpi_size_global) |
|
#define | MPI_FINALIZE() |
|
#define | AU_Reduce(local_buffer_p, reduced_buffer_p, size, type, op, root, comm) |
|
#define | AU_Bcast(data_bffer_p, count_p, datatype_p, root_p, comm_p) |
|
◆ AU_Bcast
#define AU_Bcast |
( |
|
data_bffer_p, |
|
|
|
count_p, |
|
|
|
datatype_p, |
|
|
|
root_p, |
|
|
|
comm_p |
|
) |
| |
Value: { \
MPI_Bcast(data_bffer_p, count_p, datatype_p, root_p, comm_p); \
}
◆ AU_MPI_Datatype
#define AU_MPI_Datatype MPI_Datatype |
◆ AU_MPI_Op
◆ AU_Reduce
#define AU_Reduce |
( |
|
local_buffer_p, |
|
|
|
reduced_buffer_p, |
|
|
|
size, |
|
|
|
type, |
|
|
|
op, |
|
|
|
root, |
|
|
|
comm |
|
) |
| |
Value: { \
MPI_Reduce(local_buffer_p, reduced_buffer_p, size, type, op, root, comm); \
}
◆ AU_WTIME
#define AU_WTIME MPI_Wtime() |
◆ AU_WTIME_TYPE
#define AU_WTIME_TYPE double |
◆ ENABLE_MPI
◆ MPI_COMM_TYPE
#define MPI_COMM_TYPE MPI_Comm |
◆ MPI_COMM_WORLD_DEFAULT
#define MPI_COMM_WORLD_DEFAULT MPI_COMM_WORLD |
◆ MPI_FINALIZE
Value: { \
int mpi_finalize_flag = 0; \
MPI_Finalized(&mpi_finalize_flag); \
if (!mpi_finalize_flag) \
{ \
MPI_Finalize(); \
} \
}
◆ MPI_INFO_NULL_DEFAULT
#define MPI_INFO_NULL_DEFAULT MPI_INFO_NULL |
◆ MPI_INIT
#define MPI_INIT |
( |
|
argc, |
|
|
|
argv, |
|
|
|
au_mpi_comm_global, |
|
|
|
au_mpi_rank_global, |
|
|
|
au_mpi_size_global |
|
) |
| |
Value: { \
int mpi_init_flag = 0; \
MPI_Initialized(&mpi_init_flag); \
if (!mpi_init_flag) \
{ \
MPI_Init(&argc, &argv); \
} \
}
MPI_COMM_TYPE au_mpi_comm_global
◆ InferMPIMergeOp()
MPI_Op InferMPIMergeOp |
( |
std::string & |
opt_str | ) |
|
|
inline |
◆ InferMPIType()
template<typename T >
MPI_Datatype InferMPIType |
( |
| ) |
|
|
inline |
◆ MPIReduceStats()
template<typename T >
void MPIReduceStats |
( |
const T |
local_value, |
|
|
std::vector< T > & |
stats_vector |
|
) |
| |
|
inline |
get max/min/sum of local_value
- Template Parameters
-
- Parameters
-
local_value | : input value |
stats_vector | : stats result: max, min, sum |