⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vec_slave.c

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 C
字号:
#include "p4.h"#include "sr_user.h"    slave()	{    int nslaves;    int done;    int type, from, size;    int next;    int my_id;    char *incoming;        my_id = p4_get_my_id();    nslaves = p4_num_total_ids() - 1;        if (my_id == nslaves)        next = 0;    else	next = my_id + 1;        done = FALSE;    while (!done)    {	type = -1;	from = -1;	incoming = NULL;	p4_recv(&type,&from, &incoming, &size);	p4_sendx(type, next, incoming, size, P4INT);	if (type == END)	    done = TRUE;	p4_msg_free(incoming);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -