SYNTAX
------

C Syntax
^^^^^^^^

.. code-block:: c

    int MPI_Neighbor_alltoall(const void* sendbuf, int sendcount,
        MPI_Datatype sendtype, void* recvbuf, int recvcount,
        MPI_Datatype recvtype, MPI_Comm comm)

    int MPI_Neighbor_alltoall_c(const void* sendbuf, MPI_Count
        sendcount, MPI_Datatype sendtype, void* recvbuf, MPI_Count
        recvcount, MPI_Datatype recvtype, MPI_Comm comm)

    int MPI_Ineighbor_alltoall(const void* sendbuf, int sendcount,
        MPI_Datatype sendtype, void* recvbuf, int recvcount,
        MPI_Datatype recvtype, MPI_Comm comm, MPI_Request* request)

    int MPI_Ineighbor_alltoall_c(const void* sendbuf, MPI_Count
        sendcount, MPI_Datatype sendtype, void* recvbuf, MPI_Count
        recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request*
        request)

    int MPI_Neighbor_alltoall_init(const void* sendbuf, int sendcount,
        MPI_Datatype sendtype, void* recvbuf, int recvcount,
        MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info,
        MPI_Request* request)

    int MPI_Neighbor_alltoall_init_c(const void* sendbuf, MPI_Count
        sendcount, MPI_Datatype sendtype, void* recvbuf, MPI_Count
        recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Info info,
        MPI_Request* request)

Fortran Syntax
^^^^^^^^^^^^^^

.. code-block:: fortran

    USE MPI
    ! or the older form: INCLUDE 'mpif.h'
    MPI_NEIGHBOR_ALLTOALL(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, COMM, IERROR)
    	<type> SENDBUF(*), RECVBUF(*)
    	INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, IERROR

    MPI_INEIGHBOR_ALLTOALL(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, COMM, REQUEST, IERROR)
    	<type> SENDBUF(*), RECVBUF(*)
    	INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, REQUEST, IERROR

    MPI_NEIGHBOR_ALLTOALL_INIT(SENDBUF, SENDCOUNT, SENDTYPE, RECVBUF, RECVCOUNT, RECVTYPE, COMM, INFO, REQUEST, IERROR)
    	<type> SENDBUF(*), RECVBUF(*)
    	INTEGER SENDCOUNT, SENDTYPE, RECVCOUNT, RECVTYPE, COMM, INFO, REQUEST, IERROR

Fortran 2008 Syntax
^^^^^^^^^^^^^^^^^^^

.. code-block:: fortran

    USE mpi_f08
    MPI_Neighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN) :: sendbuf
    	INTEGER, INTENT(IN) :: sendcount, recvcount
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..) :: recvbuf
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Neighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN) :: sendbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: sendcount, recvcount
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..) :: recvbuf
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Ineighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
    	INTEGER, INTENT(IN) :: sendcount, recvcount
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	TYPE(MPI_Request), INTENT(OUT) :: request
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Ineighbor_alltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: sendcount, recvcount
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	TYPE(MPI_Request), INTENT(OUT) :: request
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Neighbor_alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
    	INTEGER, INTENT(IN) :: sendcount, recvcount
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	TYPE(MPI_Info), INTENT(IN) :: info
    	TYPE(MPI_Request), INTENT(OUT) :: request
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror

    MPI_Neighbor_alltoall_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, info, request, ierror)
    	TYPE(*), DIMENSION(..), INTENT(IN), ASYNCHRONOUS :: sendbuf
    	INTEGER(KIND=MPI_COUNT_KIND), INTENT(IN) :: sendcount, recvcount
    	TYPE(MPI_Datatype), INTENT(IN) :: sendtype, recvtype
    	TYPE(*), DIMENSION(..), ASYNCHRONOUS :: recvbuf
    	TYPE(MPI_Comm), INTENT(IN) :: comm
    	TYPE(MPI_Info), INTENT(IN) :: info
    	TYPE(MPI_Request), INTENT(OUT) :: request
    	INTEGER, OPTIONAL, INTENT(OUT) :: ierror
