Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
IceT
IceT
Commits
537cf837
Commit
537cf837
authored
May 04, 2011
by
Kenneth Moreland
Browse files
Added icetCommAlltoall collective communication function.
parent
2b735471
Changes
5
Hide whitespace changes
Inline
Side-by-side
Changes.txt
View file @
537cf837
...
...
@@ -100,3 +100,6 @@ ICET_MAX_IMAGE_SPLIT environment variable, cmake variable, state variable
All the matrix math helpers icetMatrix* in IceTDevMatrix.h
Const versions of icetImageGetColor* and icetImageGetDepth* functions.
Added Alltoall to communicator. (Search for Allgather for places to add in
documentation.)
src/communication/mpi.c
View file @
537cf837
...
...
@@ -66,6 +66,11 @@ static void Allgather(IceTCommunicator self,
int
sendcount
,
IceTEnum
datatype
,
void
*
recvbuf
);
static
void
Alltoall
(
IceTCommunicator
self
,
const
void
*
sendbuf
,
int
sendcount
,
IceTEnum
datatype
,
void
*
recvbuf
);
static
IceTCommRequest
Isend
(
IceTCommunicator
self
,
const
void
*
buf
,
int
count
,
...
...
@@ -196,6 +201,7 @@ IceTCommunicator icetCreateMPICommunicator(MPI_Comm mpi_comm)
comm
->
Gather
=
Gather
;
comm
->
Gatherv
=
Gatherv
;
comm
->
Allgather
=
Allgather
;
comm
->
Alltoall
=
Alltoall
;
comm
->
Isend
=
Isend
;
comm
->
Irecv
=
Irecv
;
comm
->
Wait
=
Waitone
;
...
...
@@ -365,6 +371,20 @@ static void Allgather(IceTCommunicator self,
MPI_COMM
);
}
static
void
Alltoall
(
IceTCommunicator
self
,
const
void
*
sendbuf
,
int
sendcount
,
IceTEnum
datatype
,
void
*
recvbuf
)
{
MPI_Datatype
mpitype
;
CONVERT_DATATYPE
(
datatype
,
mpitype
);
MPI_Alltoall
((
void
*
)
sendbuf
,
sendcount
,
mpitype
,
recvbuf
,
sendcount
,
mpitype
,
MPI_COMM
);
}
static
IceTCommRequest
Isend
(
IceTCommunicator
self
,
const
void
*
buf
,
int
count
,
...
...
src/ice-t/communication.c
View file @
537cf837
...
...
@@ -158,6 +158,17 @@ void icetCommAllgather(const void *sendbuf,
comm
->
Allgather
(
comm
,
sendbuf
,
(
int
)
sendcount
,
datatype
,
recvbuf
);
}
void
icetCommAlltoall
(
const
void
*
sendbuf
,
IceTSizeType
sendcount
,
IceTEnum
datatype
,
void
*
recvbuf
)
{
IceTCommunicator
comm
=
icetGetCommunicator
();
icetCommCheckCount
(
sendcount
);
icetAddSent
(
sendcount
,
datatype
);
comm
->
Alltoall
(
comm
,
sendbuf
,
(
int
)
sendcount
,
datatype
,
recvbuf
);
}
IceTCommRequest
icetCommIsend
(
const
void
*
buf
,
IceTSizeType
count
,
IceTEnum
datatype
,
...
...
src/include/IceT.h
View file @
537cf837
...
...
@@ -94,6 +94,11 @@ struct IceTCommunicatorStruct {
int
sendcount
,
IceTEnum
datatype
,
void
*
recvbuf
);
void
(
*
Alltoall
)(
struct
IceTCommunicatorStruct
*
self
,
const
void
*
sendbuf
,
int
sendcount
,
IceTEnum
datatype
,
void
*
recvbuf
);
IceTCommRequest
(
*
Isend
)(
struct
IceTCommunicatorStruct
*
self
,
const
void
*
buf
,
...
...
src/include/IceTDevCommunication.h
View file @
537cf837
...
...
@@ -59,6 +59,10 @@ ICET_EXPORT void icetCommAllgather(const void *sendbuf,
IceTSizeType
sendcount
,
IceTEnum
type
,
void
*
recvbuf
);
ICET_EXPORT
void
icetCommAlltoall
(
const
void
*
sendbuf
,
IceTSizeType
sendcount
,
IceTEnum
type
,
void
*
recvbuf
);
ICET_EXPORT
IceTCommRequest
icetCommIsend
(
const
void
*
buf
,
IceTSizeType
count
,
IceTEnum
datatype
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment