1 #ifndef MCA_COLL_FCA_CONVERTOR_H
2 #define MCA_COLL_FCA_CONVERTOR_H
8 MCA_COLL_CONVERTOR_NULL = 0,
9 MCA_COLL_FCA_CONV_SEND,
10 MCA_COLL_FCA_CONV_RECV
16 FCA_CONVERTOR_T ompic;
21 #define MCA_COLL_FCA_DECLARE_CONVERTOR(__name) \
22 struct mca_coll_fca_convertor __name = {MCA_COLL_CONVERTOR_NULL}
27 void *buffer,
int count)
29 if (conv->type == MCA_COLL_FCA_CONV_SEND) {
30 FCA_CONVERTOR_COPY_AND_PREPARE_FOR_SEND(ompi_mpi_local_convertor,
31 &datatype->
super, count,
32 buffer, 0, &conv->ompic);
33 }
else if (conv->type == MCA_COLL_FCA_CONV_RECV) {
34 FCA_CONVERTOR_COPY_AND_PREPARE_FOR_RECV(ompi_mpi_local_convertor,
35 &datatype->
super, count,
36 buffer, 0, &conv->ompic);
42 int count,
void *buffer,
int type,
43 void **tmpbuf,
size_t *size)
47 mca_coll_fca_convertor_set(conv, datatype, buffer, count);
48 FCA_CONVERTOR_CONVERTOR_GET_PACKED_SIZE(&conv->ompic, &conv->size);
49 conv->buf = malloc(conv->size);
56 return conv->type != MCA_COLL_CONVERTOR_NULL;
61 if (mca_coll_fca_convertor_valid(conv)) {
75 invec.iov_base = (
char*)conv->buf + offset;
76 invec.iov_len = conv->size;
79 if (conv->type == MCA_COLL_FCA_CONV_SEND) {
80 return FCA_CONVERTOR_CONVERTOR_PACK(&conv->ompic, &invec, &iov_count, &size);
81 }
else if (conv->type == MCA_COLL_FCA_CONV_RECV) {
82 return FCA_CONVERTOR_CONVERTOR_UNPACK(&conv->ompic, &invec, &iov_count, &size);
Definition: ompi_datatype.h:68
Definition: coll_fca_convertor.h:14
opal_datatype_t super
Base opal_datatype_t superclass.
Definition: ompi_datatype.h:69
#define OBJ_CONSTRUCT(object, type)
Construct (initialize) objects that are not dynamically allocated.
Definition: opal_object.h:342
Definition: ompi_uio.h:29
#define OBJ_DESTRUCT(object)
Destruct (finalize) an object that is not dynamically allocated.
Definition: opal_object.h:374