@@ -137,6 +137,59 @@ private native int getElements(
137137			int  source , int  tag , int  error ,
138138			int  cancelled , long  ucount , long  datatype ) throws  MPIException ;
139139
140+ 	/** 
141+ 	 * Sets the number of basic elements for this status object. 
142+ 	 * <p>Java binding of the MPI operation {@code MPI_STATUS_SET_ELEMENTS}. 
143+ 	 * @param datatype 	datatype used by receive operation 
144+ 	 * @param count		number of elements to associate with the status 
145+ 	 * @throws MPIException Signals that an MPI exception of some sort has occurred. 
146+ 	 */ 
147+ 	public  void  setElements (Datatype  datatype , int  count ) throws  MPIException 
148+ 	{
149+ 		MPI .check ();
150+ 		int   i  = 0 ;
151+ 		int   source     = (int )data [i ++];
152+ 		int   tag        = (int )data [i ++];
153+ 		int   error      = (int )data [i ++];
154+ 		int   cancelled  = (int )data [i ++];
155+ 		long  ucount     = data [i ++];
156+ 		data [4 ] = setElements (source , tag , error , cancelled , ucount , datatype .handle , count );
157+ 	}
158+ 
159+ 	private  native  int  setElements (
160+ 			int  source , int  tag , int  error ,
161+ 			int  cancelled , long  ucount , long  datatype , int  count ) throws  MPIException ;
162+ 	
163+ 	/** 
164+ 	 * Sets the cancelled flag. 
165+ 	 * <p>Java binding of the MPI operation {@code MPI_STATUS_SET_CANCELLED}. 
166+ 	 * @param flag	if true indicates request was cancelled 
167+ 	 * @throws MPIException Signals that an MPI exception of some sort has occurred. 
168+ 	 */ 
169+ 	public  void  setCancelled (boolean  flag ) throws  MPIException 
170+ 	{
171+ 		MPI .check ();
172+ 		int   i  = 0 ;
173+ 		int   source     = (int )data [i ++];
174+ 		int   tag        = (int )data [i ++];
175+ 		int   error      = (int )data [i ++];
176+ 		int   cancelled  = (int )data [i ++];
177+ 		long  ucount     = data [i ++];
178+ 		
179+ 		if (flag ) {
180+ 			setCancelled (source , tag , error , cancelled , ucount , 1 );
181+ 			data [3 ] = 1 ;
182+ 		} else  {
183+ 			setCancelled (source , tag , error , cancelled , ucount , 0 );
184+ 			data [3 ] = 0 ;
185+ 		}
186+ 		
187+ 	}
188+ 
189+ 	private  native  void  setCancelled (
190+ 			int  source , int  tag , int  error ,
191+ 			int  cancelled , long  ucount , int  flag ) throws  MPIException ;
192+ 	
140193	/** 
141194	 * Returns the "source" of message. 
142195	 * <p>Java binding of the MPI value {@code MPI_SOURCE}. 
0 commit comments