MPI_Reduce

include <mpi.h>

int MPI_Reduce(const void *sendbuf, void *recvbuf, int count,MPI_Datatype datatype, MPI_Op op, int root,MPI_Comm comm)
int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count,MPI_Datatype datatype, MPI_Op op, int root,MPI_Comm comm, MPI_Request *request)

sendbuf :发送缓存的地址
count:发送至缓存的数据个数
datatype:发送缓存的数据类型
op:归约操作(句柄)
root 根进程
comm:通信组(句柄)

其中count的数据的个数的意思是在单个进程要发送的数据的个数

posted @ 2023-01-30 10:58  MITE's_BKY  阅读(159)  评论(0)    收藏  举报