datatype(数据类型)
<p><strong>datatype</strong></p>
<p>数据类型</p>
<p><strong>数据类型执行代码</strong>
<a href="https://github.com/qianyongjun895/HPIPS/tree/master/OpenMpi-Chain/ompi/datatype">https://github.com/qianyongjun895/HPIPS/tree/master/OpenMpi-Chain/ompi/datatype</a></p>
<p><strong>datatype宏定义</strong>
int MPI_Abort(MPI_Comm comm, int errorcode)
<strong>线程累加执行代码</strong>
<strong>define OMPI_DATATYPE_FLAG_PREDEFINED 0x0200</strong>
保持对预定义数据类型的跟踪
<strong>define OMPI_DATATYPE_FLAG_DATA_INT 0x1000</strong>
<strong>define OMPI_DATATYPE_FLAG_DATA_FLOAT 0x2000</strong>
<strong>define OMPI_DATATYPE_FLAG_DATA_COMPLEX 0x3000</strong>
<strong>define OMPI_DATATYPE_FLAG_DATA_TYPE 0x3000</strong>
数据类型的用途
<strong>define OMPI_DATATYPE_FLAG_DATA_C 0x4000</strong>
<strong>define OMPI_DATATYPE_FLAG_DATA_CPP 0x8000</strong>
<strong>define OMPI_DATATYPE_FLAG_DATA_FORTRAN 0xC000</strong>
<strong>define OMPI_DATATYPE_FLAG_DATA_LANGUAGE 0xC000</strong>
<strong>define OMPI_DATATYPE_MAX_PREDEFINED 47</strong></p>
<p><strong>ompi_datatype_t数据类型宏定义</strong>
struct ompi_datatype_t {</p>
<pre><code>opal_datatype_t super; 基 opal_datatype_t 超类
cacheline 5 边界 (320 个字节) 是32字节前
int32_t id; OMPI-层类型的唯一 id
int32_t d_f_to_c_index; 此数据类型的 Fortran 索引
struct opal_hash_table_t *d_keyhash; 属性字段
void* args; 用户的数据描述
void* packed_description; 数据类型的包装描述
uint64_t pml_data; 特定于 PML 的信息
cacheline 6 边界 (384 字节)
char name[MPI_MAX_OBJECT_NAME];外部可见名称</code></pre>
<p>};
typedef struct ompi_datatype_t ompi_datatype_t;</p>
<p><strong>ompi_predefined_datatype_t预定义数据类型</strong></p>
<p>struct ompi_predefined_datatype_t {</p>
<p>struct ompi_datatype_t dt;
char padding[PREDEFINED_DATATYPE_PAD - sizeof(ompi_datatype_t)];</p>
<p>};
typedef struct ompi_predefined_datatype_t ompi_predefined_datatype_t;</p>
<p><strong>数据初始化</strong>
ompi_datatype_init( void )
<strong>数据完成</strong>
ompi_datatype_finalize( void );
<strong>ompi 数据类型默认转换转换 init</strong>
ompi_datatype_default_convertors_init( void );
<strong>数据默认转换函数</strong>
ompi_datatype_default_convertors_fini( void );
<strong>数据转化为存储</strong>
ompi_datatype_dump (const ompi_datatype_t<em> pData);
<strong>数据类型创建</strong>
ompi_datatype_t</em> ompi_datatype_create( int32_t expectedSize )
<strong>数据类型转换到通讯</strong>
ompi_datatype_is_committed( const ompi_datatype_t<em> type )
<strong>数据类型拷贝</strong>
ompi_datatype_is_overlapped( const ompi_datatype_t</em> type )
<strong>数据类型有效</strong>
ompi_datatype_is_valid( const ompi_datatype_t<em> type )
<strong>数据预处理</strong>
ompi_datatype_is_predefined( const ompi_datatype_t</em> type )
<strong>数据类型是连续内存布局</strong>
ompi_datatype_is_contiguous_memory_layout( const ompi_datatype_t<em> type, int32_t count )
<strong>数据提交</strong>
ompi_datatype_commit( ompi_datatype_t <strong> type )
</strong>数据销毁<strong>
ompi_datatype_destroy( ompi_datatype_t</strong> type);
<strong>增加数据</strong>
ompi_datatype_add( ompi_datatype_t</em> pdtBase, const ompi_datatype_t<em> pdtAdd, uint32_t count,ptrdiff_t disp, ptrdiff_t extent )
<strong>数据拷贝</strong>
ompi_datatype_duplicate( const ompi_datatype_t</em> oldType, ompi_datatype_t** newType )</p>
<p><strong>创建连续数据</strong>
ompi_datatype_create_contiguous( int count, const ompi_datatype_t* oldType, ompi_datatype_t** newType );</p>
<p><strong>创建给定的数据值</strong>
ompi_datatype_create_vector( int count, int bLength, int stride,
const ompi_datatype_t* oldType, ompi_datatype_t** newType );</p>
<p><strong>创建向量数值参数</strong>、
ompi_datatype_create_hvector( int count, int bLength, ptrdiff_t stride,const ompi_datatype_t* oldType, ompi_datatype_t** newType );</p>
<p><strong>创建数据的索引</strong>
ompi_datatype_create_indexed( int count, const int<em> pBlockLength, const int</em> pDisp,const ompi_datatype_t* oldType, ompi_datatype_t** newType );</p>
<p><strong>创建结果数据</strong>
ompi_datatype_create_hindexed( int count, const int<em> pBlockLength, const ptrdiff_t</em> pDisp,const ompi_datatype_t* oldType, ompi_datatype_t** newType );</p>
<p><strong>创建索引数据区块</strong>
ompi_datatype_create_indexed_block( int count, int bLength, const int<em> pDisp, const ompi_datatype_t</em> oldType, ompi_datatype_t** newType );</p>
<p><strong>创建结果数据区块</strong>
ompi_datatype_create_hindexed_block( int count, int bLength, const ptrdiff_t<em> pDisp,const ompi_datatype_t</em> oldType, ompi_datatype_t** newType )</p>
<p><strong>创建数据架构</strong>
ompi_datatype_create_struct( int count, const int<em> pBlockLength, const ptrdiff_t</em> pDisp, ompi_datatype_t<em> const</em> pTypes, ompi_datatype_t** newType );</p>
<p><strong>创建三维数据结构</strong>
ompi_datatype_create_subarray(int ndims, int const<em> size_array, int const</em> subsize_array,int const<em> start_array, int order,
const ompi_datatype_t</em> oldtype, ompi_datatype_t** newtype)</p>
<p><strong>创建数据调整</strong>
ompi_datatype_create_resized( const ompi_datatype_t* oldType,ptrdiff_t lb,ptrdiff_t extent,ompi_datatype_t** newType )</p>
<p><strong>根据前排ID提取数据</strong>
ompi_datatype_type_lb( const ompi_datatype_t<em> type, ptrdiff_t</em> disp )</p>
<p><strong>根据后排ID提取数据</strong>
ompi_datatype_type_ub( const ompi_datatype_t<em> type, ptrdiff_t</em> disp )</p>
<p><strong>获取数据的尺寸</strong>
ompi_datatype_type_size ( const ompi_datatype_t<em> type, size_t </em>size )</p>
<p><strong>获取数据的范围</strong>
ompi_datatype_type_extent( const ompi_datatype_t<em> type, ptrdiff_t</em> extent )</p>
<p><strong>获取数据区间</strong>
ompi_datatype_get_extent( const ompi_datatype_t<em> type, ptrdiff_t</em> lb, ptrdiff_t* extent)</p>
<p><strong>正确获取数据区间</strong>
ompi_datatype_get_true_extent( const ompi_datatype_t<em> type, ptrdiff_t</em> true_lb, ptrdiff_t* true_extent)</p>
<p><strong>获取数据的元素</strong>
ompi_datatype_get_element_count( const ompi_datatype_t* type, size_t iSize )</p>
<p><strong>设置数据的元素</strong>
ompi_datatype_set_element_count( const ompi_datatype_t<em> type, size_t count, size_t</em> length )</p>
<p><strong>数据复制函数</strong>
ompi_datatype_copy_content_same_ddt( const ompi_datatype_t<em> type, size_t count,char</em> pDestBuf, char* pSrcBuf )</p>
<p><strong>设置数据的大小</strong>
ompi_datatype_t* ompi_datatype_match_size( int size, uint16_t datakind, uint16_t datalang )</p>
<p><strong>数据可视化函数</strong>
ompi_datatype_sndrcv( const void <em>sbuf, int32_t scount, const ompi_datatype_t</em> sdtype,void <em>rbuf, int32_t rcount, const ompi_datatype_t</em> rdtype)</p>
<p><strong>获取数据参数</strong>
ompi_datatype_get_args( const ompi_datatype_t<em> pData, int32_t which,int32_t </em> ci, int32_t <em> i,int32_t </em> ca, ptrdiff_t<em> a,int32_t </em> cd, ompi_datatype_t*<em> d, int32_t </em> type)</p>
<p><strong>设置数据参数</strong>
ompi_datatype_set_args( ompi_datatype_t* pData,int32_t ci, const int32_t *<em> i,int32_t ca, const ptrdiff_t</em> a,int32_t cd, ompi_datatype_t<em> const </em> d,int32_t type);</p>
<p><strong>拷贝参数</strong>
ompi_datatype_copy_args( const ompi_datatype_t<em> source_data,ompi_datatype_t</em> dest_data )</p>
<p><strong>参数释放</strong>
ompi_datatype_release_args( ompi_datatype_t* pData )</p>
<p><strong>获得参数的单一预定义类型</strong>
ompi_datatype_get_single_predefined_type_from_args( ompi_datatype_t* type )</p>
<p><strong>参数封装长度说明</strong>
ompi_datatype_get_pack_description( ompi_datatype_t* datatype,
const void** packed_buffer )</p>
<p><strong>在封装参数里面呢创建参数</strong>
ompi_datatype_create_from_packed_description( void*<em> packed_buffer,struct ompi_proc_t</em> remote_processor )</p>
<p><strong>数据参数打印</strong>
ompi_datatype_print_args( const ompi_datatype_t* pData )</p>
<p><strong>获取参数的元素</strong>
ompi_datatype_get_elements (ompi_datatype_t <em>datatype, size_t ucount,size_t </em>count)</p>
<p><strong>保护指针调试断点</strong>
ompi_datatype_safeguard_pointer_debug_breakpoint( const void<em> actual_ptr, int length,const void</em> initial_ptr,const ompi_datatype_t* pData,int count )</p>
<p><strong>数据封装</strong>
ompi_datatype_pack_external( const char datarep[], const void <em>inbuf, int incount,ompi_datatype_t </em>datatype, void <em>outbuf,
MPI_Aint outsize, MPI_Aint </em>position)</p>
<p><strong>数据解析</strong>
ompi_datatype_unpack_external( const char datarep[], const void <em>inbuf, MPI_Aint insize,MPI_Aint </em>position, void <em>outbuf, int outcount,ompi_datatype_t </em>datatype)</p>
<p><strong>数据封装尺寸</strong>
ompi_datatype_pack_external_size( const char datarep[], int incount,ompi_datatype_t <em>datatype, MPI_Aint </em>size)</p>