1010 *
1111 * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
1212 * Copyright (c) 2014 NVIDIA Corporation. All rights reserved.
13- * Copyright (c) 2015 Research Organization for Information Science
13+ * Copyright (c) 2015-2016 Research Organization for Information Science
1414 * and Technology (RIST). All rights reserved.
1515 * Copyright (c) 2015 Los Alamos National Security, LLC. All rights
1616 * reserved.
@@ -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_recv (void * buf , char tmpbuf , int count , MPI_Datatype datatype , int source , NBC_Schedule * schedule , bool barrier );
@@ -151,6 +158,7 @@ int NBC_Sched_copy (void *src, char tmpsrc, int srccount, MPI_Datatype srctype,
151158 MPI_Datatype tgttype , NBC_Schedule * schedule , bool barrier );
152159int NBC_Sched_unpack (void * inbuf , char tmpinbuf , int count , MPI_Datatype datatype , void * outbuf , char tmpoutbuf ,
153160 NBC_Schedule * schedule , bool barrier );
161+ int NBC_Sched_datatype (MPI_Datatype datatype , NBC_Schedule * schedule );
154162
155163int NBC_Sched_barrier (NBC_Schedule * schedule );
156164int NBC_Sched_commit (NBC_Schedule * schedule );
@@ -328,6 +336,10 @@ static inline void nbc_get_round_size (char *p, unsigned long *size) {
328336 /*printf("found a UNPACK at offset %li\n", (long)p-(long)schedule); */
329337 offset += sizeof (NBC_Args_unpack );
330338 break ;
339+ case DATATYPE :
340+ /*printf("found a DATATYPE at offset%li\n", (long)p-(long)schedule); */
341+ offset += sizeof (NBC_Args_datatype );
342+ break ;
331343 default :
332344 NBC_Error ("NBC_GET_ROUND_SIZE: bad type %i at offset %li" , type , offset );
333345 return ;
0 commit comments