@@ -496,4 +496,66 @@ public void setInfo(Info info) throws MPIException
496496private native void setInfo (long win , long info )
497497 throws MPIException ;
498498
499+ /**
500+ * <p>Java binding of the MPI operation {@code MPI_RPUT}.
501+ * @param origin_addr initial address of origin buffer
502+ * @param origin_count number of entries in origin buffer
503+ * @param origin_datatype datatype of each entry in origin buffer
504+ * @param target_rank rank of target
505+ * @param target_disp displacement from start of window to target buffer
506+ * @param target_count number of entries in target buffer
507+ * @param target_datatype datatype of each entry in target buffer
508+ * @return RMA request
509+ * @throws MPIException
510+ */
511+ public final Request rPut (Buffer origin_addr , int origin_count ,
512+ Datatype origin_datatype , int target_rank , int target_disp ,
513+ int target_count , Datatype target_datatype )
514+ throws MPIException
515+ {
516+ if (!origin_addr .isDirect ())
517+ throw new IllegalArgumentException ("The origin must be direct buffer." );
518+
519+ return new Request (rPut (handle , origin_addr , origin_count ,
520+ origin_datatype .handle , target_rank , target_disp ,
521+ target_count , target_datatype .handle , getBaseType (origin_datatype , target_datatype )));
522+ }
523+
524+ private native long rPut (long win , Buffer origin_addr , int origin_count ,
525+ long origin_datatype , int target_rank , int target_disp ,
526+ int target_count , long target_datatype , int baseType )
527+ throws MPIException ;
528+
529+ /**
530+ * Java binding of {@code MPI_RGET}.
531+ * @param origin origin buffer
532+ * @param orgCount number of entries in origin buffer
533+ * @param orgType datatype of each entry in origin buffer
534+ * @param targetRank rank of target
535+ * @param targetDisp displacement from start of window to target buffer
536+ * @param targetCount number of entries in target buffer
537+ * @param targetType datatype of each entry in target buffer
538+ * @return RMA request
539+ * @throws MPIException
540+ */
541+ public final Request rGet (Buffer origin , int orgCount , Datatype orgType ,
542+ int targetRank , int targetDisp , int targetCount ,
543+ Datatype targetType )
544+ throws MPIException
545+ {
546+ MPI .check ();
547+
548+ if (!origin .isDirect ())
549+ throw new IllegalArgumentException ("The origin must be direct buffer." );
550+
551+ return new Request (rGet (handle , origin , orgCount , orgType .handle ,
552+ targetRank , targetDisp , targetCount , targetType .handle ,
553+ getBaseType (orgType , targetType )));
554+ }
555+
556+ private native long rGet (
557+ long win , Buffer origin , int orgCount , long orgType ,
558+ int targetRank , int targetDisp , int targetCount , long targetType ,
559+ int baseType ) throws MPIException ;
560+
499561} // Win
0 commit comments