@@ -547,6 +547,30 @@ function Reduce{T}(object::T, op::Op, root::Integer, comm::Comm)
547547 isroot ? recvbuf[1 ] : nothing
548548end
549549
550+ function Ireduce {T} (sendbuf:: MPIBuffertype{T} , count:: Integer ,
551+ op:: Op , root:: Integer , comm:: Comm )
552+ rval = Ref {Cint} ()
553+ isroot = Comm_rank (comm) == root
554+ recvbuf = Array (T, isroot ? count : 0 )
555+ ccall (MPI_IREDUCE, Void,
556+ (Ptr{T}, Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint},
557+ Ptr{Cint}, Ptr{Cint}, Ptr{Cint}),
558+ sendbuf, recvbuf, & count, & mpitype (T), & op. val, & root, & comm. val,
559+ rval, & 0 )
560+ Request (rval[], sendbuf), isroot ? recvbuf : nothing
561+ end
562+
563+ function Ireduce {T} (sendbuf:: Array{T} , op:: Op , root:: Integer , comm:: Comm )
564+ Ireduce (sendbuf, length (sendbuf), op, root, comm)
565+ end
566+
567+ function Ireduce {T} (object:: T , op:: Op , root:: Integer , comm:: Comm )
568+ isroot = Comm_rank (comm) == root
569+ sendbuf = T[object]
570+ req, recvbuf = Ireduce (sendbuf, op, root, comm)
571+ req, isroot ? recvbuf[1 ] : nothing
572+ end
573+
550574function Scatter {T} (sendbuf:: MPIBuffertype{T} ,
551575 count:: Integer , root:: Integer , comm:: Comm )
552576 recvbuf = Array (T, count)
@@ -775,6 +799,21 @@ function Scan{T}(object::T, op::Op, comm::Comm)
775799 Scan (sendbuf,1 ,op,comm)
776800end
777801
802+ function Iscan {T} (sendbuf:: MPIBuffertype{T} , count:: Integer ,
803+ op:: Op , comm:: Comm )
804+ recvbuf = Array (T, count)
805+ rval = Ref {Cint} ()
806+ ccall (MPI_ISCAN, Void,
807+ (Ptr{T}, Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}),
808+ sendbuf, recvbuf, & count, & mpitype (T), & op. val, & comm. val, rval, & 0 )
809+ Request (rval[], sendbuf), recvbuf
810+ end
811+
812+ function Iscan {T} (object:: T , op:: Op , comm:: Comm )
813+ sendbuf = T[object]
814+ Iscan (sendbuf,1 ,op,comm)
815+ end
816+
778817function ExScan {T} (sendbuf:: MPIBuffertype{T} , count:: Integer ,
779818 op:: Op , comm:: Comm )
780819 recvbuf = Array (T, count)
@@ -789,6 +828,21 @@ function ExScan{T}(object::T, op::Op, comm::Comm)
789828 ExScan (sendbuf,1 ,op,comm)
790829end
791830
831+ function IExScan {T} (sendbuf:: MPIBuffertype{T} , count:: Integer ,
832+ op:: Op , comm:: Comm )
833+ recvbuf = Array (T, count)
834+ rval = Ref {Cint} ()
835+ ccall (MPI_IEXSCAN, Void,
836+ (Ptr{T}, Ptr{T}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}, Ptr{Cint}),
837+ sendbuf, recvbuf, & count, & mpitype (T), & op. val, & comm. val, rval, & 0 )
838+ Request (rval[], sendbuf), recvbuf
839+ end
840+
841+ function IExScan {T} (object:: T , op:: Op , comm:: Comm )
842+ sendbuf = T[object]
843+ IExScan (sendbuf,1 ,op,comm)
844+ end
845+
792846# Conversion between C and Fortran Comm handles:
793847if HAVE_MPI_COMM_C2F
794848 # use MPI_Comm_f2c and MPI_Comm_c2f
0 commit comments