This source file includes following definitions.
- opal_datatype_create_contiguous
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include "opal_config.h"
23 #include "opal/constants.h"
24 #include "opal/datatype/opal_datatype.h"
25 #include "opal/datatype/opal_datatype_internal.h"
26
27 int32_t opal_datatype_create_contiguous( int count, const opal_datatype_t* oldType,
28 opal_datatype_t** newType )
29 {
30 opal_datatype_t* pdt;
31
32 if( 0 == count ) {
33 pdt = opal_datatype_create( 0 );
34 opal_datatype_add( pdt, &opal_datatype_empty, 0, 0, 0 );
35 } else {
36 pdt = opal_datatype_create( oldType->desc.used + 2 );
37 opal_datatype_add( pdt, oldType, count, 0, (oldType->ub - oldType->lb) );
38 }
39 *newType = pdt;
40 return OPAL_SUCCESS;
41 }