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

📄 p4_sock_util.h

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 H
字号:
#ifdef CAN_DO_SOCKET_MSGS#include <sys/socket.h>#endif#include <netdb.h>#ifdef P4BSD#include <sys/wait.h>#include <sys/resource.h>#endif#ifdef CAN_DO_SETSOCKOPT#include <netinet/tcp.h>#endif#define NET_RECV_GOOD 0#define NET_RECV_EOF  -1    #define NET_EXEC 1#define NET_DONE 2#define NET_RESPONSE 3#ifndef SOCK_BUFF_SIZE#define SOCK_BUFF_SIZE 16384#endif#define UNRESERVED_PORT 5001struct net_message_t {    int type:32;    int port:32;    int success:32;    char pgm[256];    char host[128];    char am_slave[32];    char message[512];};/* Definitions for system messages between slaves *//* Macros to convert from integer to net byte order and vice versa */#ifdef P4BSD#define p4_i_to_n(n)  (int) htonl( (u_long) n)#define p4_n_to_i(n)  (int) ntohl( (u_long) n)#endif#ifdef P4SYSV#if defined(IPSC860)  &&  !defined(IPSC860_SOCKETS)#define p4_i_to_n(n)  (n)#define p4_n_to_i(n)  (n)#else#define p4_i_to_n(n)  (int) htonl(n)#define p4_n_to_i(n)  (int) ntohl(n)#endif#endif

⌨️ 快捷键说明

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