@@ -81,7 +81,8 @@ typedef enum {
8181 RECV ,
8282 OP ,
8383 COPY ,
84- UNPACK
84+ UNPACK ,
85+ DATATYPE
8586} NBC_Fn_type ;
8687
8788/* the send argument struct */
@@ -142,6 +143,12 @@ typedef struct {
142143 char tmpoutbuf ;
143144} NBC_Args_unpack ;
144145
146+ /* release datatype */
147+ typedef struct {
148+ NBC_Fn_type type ;
149+ MPI_Datatype datatype ;
150+ } NBC_Args_datatype ;
151+
145152/* internal function prototypes */
146153int NBC_Sched_send (const void * buf , char tmpbuf , int count , MPI_Datatype datatype , int dest , NBC_Schedule * schedule , bool barrier );
147154int NBC_Sched_local_send (const void * buf , char tmpbuf , int count , MPI_Datatype datatype , int dest ,NBC_Schedule * schedule , bool barrier );
@@ -153,6 +160,7 @@ int NBC_Sched_copy (void *src, char tmpsrc, int srccount, MPI_Datatype srctype,
153160 MPI_Datatype tgttype , NBC_Schedule * schedule , bool barrier );
154161int NBC_Sched_unpack (void * inbuf , char tmpinbuf , int count , MPI_Datatype datatype , void * outbuf , char tmpoutbuf ,
155162 NBC_Schedule * schedule , bool barrier );
163+ int NBC_Sched_datatype (MPI_Datatype datatype , NBC_Schedule * schedule );
156164
157165int NBC_Sched_barrier (NBC_Schedule * schedule );
158166int NBC_Sched_commit (NBC_Schedule * schedule );
@@ -330,6 +338,10 @@ static inline void nbc_get_round_size (char *p, unsigned long *size) {
330338 /*printf("found a UNPACK at offset %li\n", (long)p-(long)schedule); */
331339 offset += sizeof (NBC_Args_unpack );
332340 break ;
341+ case DATATYPE :
342+ /*printf("found a DATATYPE at offset%li\n", (long)p-(long)schedule); */
343+ offset += sizeof (NBC_Args_datatype );
344+ break ;
333345 default :
334346 NBC_Error ("NBC_GET_ROUND_SIZE: bad type %i at offset %li" , type , offset );
335347 return ;
0 commit comments