Skip to content

Commit a2b8aa4

Browse files
committed
qualify serialize / deserailize shadowed methods
1 parent 941e0fe commit a2b8aa4

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/mpi-base.jl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,6 @@ const ANY_TAG = Int(MPI_ANY_TAG)
8383
const TAG_UB = Int(MPI_TAG_UB)
8484
const UNDEFINED = Int(MPI_UNDEFINED)
8585

86-
87-
8886
function serialize(x)
8987
s = IOBuffer()
9088
Base.serialize(s, x)
@@ -185,7 +183,7 @@ function Send{T<:MPIDatatype}(obj::T, dest::Integer, tag::Integer, comm::Comm)
185183
end
186184

187185
function send(obj, dest::Integer, tag::Integer, comm::Comm)
188-
buf = serialize(obj)
186+
buf = MPI.serialize(obj)
189187
Send(buf, dest, tag, comm)
190188
end
191189

@@ -210,7 +208,7 @@ function Isend{T<:MPIDatatype}(obj::T, dest::Integer, tag::Integer, comm::Comm)
210208
end
211209

212210
function isend(obj, dest::Integer, tag::Integer, comm::Comm)
213-
buf = serialize(obj)
211+
buf = MPI.serialize(obj)
214212
Isend(buf, dest, tag, comm)
215213
end
216214

@@ -240,7 +238,7 @@ function recv(src::Integer, tag::Integer, comm::Comm)
240238
count = Get_count(stat, UInt8)
241239
buf = Array(UInt8, count)
242240
stat = Recv!(buf, Get_source(stat), Get_tag(stat), comm)
243-
(deserialize(buf), stat)
241+
(MPI.deserialize(buf), stat)
244242
end
245243

246244
function Irecv!{T<:MPIDatatype}(buf::Union{Ptr{T},Array{T}}, count::Integer,
@@ -266,7 +264,7 @@ function irecv(src::Integer, tag::Integer, comm::Comm)
266264
count = Get_count(stat, UInt8)
267265
buf = Array(UInt8, count)
268266
stat = Recv!(buf, Get_source(stat), Get_tag(stat), comm)
269-
(true, deserialize(buf), stat)
267+
(true, MPI.deserialize(buf), stat)
270268
end
271269

272270
function Wait!(req::Request)
@@ -358,7 +356,7 @@ function bcast(obj, root::Integer, comm::Comm)
358356
isroot = Comm_rank(comm) == root
359357
count = Array(Cint, 1)
360358
if isroot
361-
buf = serialize(obj)
359+
buf = MPI.serialize(obj)
362360
count[1] = length(buf)
363361
end
364362
Bcast!(count, root, comm)
@@ -367,7 +365,7 @@ function bcast(obj, root::Integer, comm::Comm)
367365
end
368366
Bcast!(buf, root, comm)
369367
if !isroot
370-
obj = deserialize(buf)
368+
obj = MPI.deserialize(buf)
371369
end
372370
obj
373371
end

0 commit comments

Comments
 (0)