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

📄 flatten.c

📁 The example for Boor USING MPI2
💻 C
字号:
#include "mpi.h"typedef struct {    MPI_Aint *offsets;    int *lengths;    int n;  /*no. of entries in the offsets and lengths arrays*/    int ref_count; /* reference count */} flat_struct;void Flatten_datatype(MPI_Datatype datatype){    flat_struct *flat_dtype;    int key;    flat_dtype = (flat_struct *) malloc(sizeof(flat_struct));    flat_dtype->ref_count = 1;    /* code for allocating memory for the arrays "offsets" and        "lengths" and for flattening the datatype and filling in the       offsets and lengths arrays goes here */    MPI_Type_create_keyval(Copy_fn, Delete_fn, &key, (void *) 0);    MPI_Type_set_attr(datatype, key, flat_dtype);}

⌨️ 快捷键说明

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