Commit 681db288 authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r9978] const interface for MPI-3. See MPI Forum ticket #140. Currently

disabled for the public interfaces, but all internal functions use
const.

No reviewer.
parent c98c1349
This diff is collapsed.
This diff is collapsed.
......@@ -61,16 +61,16 @@ int MPID_Sched_clone(MPID_Sched_t orig, MPID_Sched_t *cloned);
int MPID_Sched_start(MPID_Sched_t *sp, MPID_Comm *comm, int tag, MPID_Request **req);
/* send and recv take a comm ptr to enable hierarchical collectives */
int MPID_Sched_send(void *buf, int count, MPI_Datatype datatype, int dest, MPID_Comm *comm, MPID_Sched_t s);
int MPID_Sched_send(const void *buf, int count, MPI_Datatype datatype, int dest, MPID_Comm *comm, MPID_Sched_t s);
int MPID_Sched_recv(void *buf, int count, MPI_Datatype datatype, int src, MPID_Comm *comm, MPID_Sched_t s);
/* just like MPI_Issend, can't complete until the matching recv is posted */
int MPID_Sched_ssend(void *buf, int count, MPI_Datatype datatype, int dest, MPID_Comm *comm, MPID_Sched_t s);
int MPID_Sched_ssend(const void *buf, int count, MPI_Datatype datatype, int dest, MPID_Comm *comm, MPID_Sched_t s);
int MPID_Sched_reduce(void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op, MPID_Sched_t s);
int MPID_Sched_reduce(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op, MPID_Sched_t s);
/* packing/unpacking can be accomplished by passing MPI_PACKED as either intype
* or outtype */
int MPID_Sched_copy(void *inbuf, int incount, MPI_Datatype intype,
int MPID_Sched_copy(const void *inbuf, int incount, MPI_Datatype intype,
void *outbuf, int outcount, MPI_Datatype outtype, MPID_Sched_t s);
/* require that all previously added ops are complete before subsequent ops
* may begin to execute */
......@@ -92,7 +92,7 @@ int MPID_Sched_barrier(MPID_Sched_t s);
* A corresponding _recv_defer function is not currently provided because there
* is no known use case. The recv count is just an upper bound, not an exact
* amount to be received, so an oversized recv is used instead of deferral. */
int MPID_Sched_send_defer(void *buf, int *count, MPI_Datatype datatype, int dest, MPID_Comm *comm, MPID_Sched_t s);
int MPID_Sched_send_defer(const void *buf, const int *count, MPI_Datatype datatype, int dest, MPID_Comm *comm, MPID_Sched_t s);
/* Just like MPID_Sched_recv except it populates the given status object with
* the received count and error information, much like a normal recv. Often
* useful in conjunction with MPID_Sched_send_defer. */
......
......@@ -95,16 +95,16 @@ int CollChk_get_win(MPI_Win win, MPI_Comm *comm);
#endif
void CollChk_set_begin(char* in);
void CollChk_unset_begin(void);
int CollChk_check_buff(MPI_Comm comm, void * buff, char* call);
int CollChk_check_dims(MPI_Comm comm, int ndims, int *dims, char* call);
int CollChk_check_graph(MPI_Comm comm, int nnodes, int *index, int* edges,
int CollChk_check_buff(MPI_Comm comm, const void * buff, char* call);
int CollChk_check_dims(MPI_Comm comm, int ndims, const int *dims, char* call);
int CollChk_check_graph(MPI_Comm comm, int nnodes, const int *index, const int* edges,
char* call);
int CollChk_check_size(MPI_Comm comm, int size, char* call);
int CollChk_err_han(char * err_str, int err_code, char * call, MPI_Comm comm);
int CollChk_is_init(void);
int CollChk_same_amode(MPI_Comm comm, int amode, char* call);
int CollChk_same_call(MPI_Comm comm, char* call);
int CollChk_same_datarep(MPI_Comm comm, char* datarep, char *call);
int CollChk_same_datarep(MPI_Comm comm, const char* datarep, char *call);
int CollChk_hash_equal(const CollChk_hash_t *alpha,
const CollChk_hash_t *beta);
......@@ -117,7 +117,7 @@ int CollChk_dtype_scatter(MPI_Comm comm,
MPI_Datatype recvtype, int recvcnt,
int root, int are2buffs, char *call);
int CollChk_dtype_scatterv(MPI_Comm comm,
MPI_Datatype sendtype, int *sendcnts,
MPI_Datatype sendtype, const int *sendcnts,
MPI_Datatype recvtype, int recvcnt,
int root, int are2buffs, char *call);
int CollChk_dtype_allgather(MPI_Comm comm,
......@@ -126,15 +126,15 @@ int CollChk_dtype_allgather(MPI_Comm comm,
int are2buffs, char *call);
int CollChk_dtype_allgatherv(MPI_Comm comm,
MPI_Datatype sendtype, int sendcnt,
MPI_Datatype recvtype, int *recvcnts,
MPI_Datatype recvtype, const int *recvcnts,
int are2buffs, char *call);
int CollChk_dtype_alltoallv(MPI_Comm comm,
MPI_Datatype sendtype, int *sendcnts,
MPI_Datatype recvtype, int *recvcnts,
MPI_Datatype sendtype, const int *sendcnts,
MPI_Datatype recvtype, const int *recvcnts,
char *call);
int CollChk_dtype_alltoallw(MPI_Comm comm,
MPI_Datatype *sendtypes, int *sendcnts,
MPI_Datatype *recvtypes, int *recvcnts,
const MPI_Datatype *sendtypes, const int *sendcnts,
const MPI_Datatype *recvtypes, const int *recvcnts,
char *call);
int CollChk_same_high_low(MPI_Comm comm, int high_low, char* call);
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int MPI_Allgather( void* sbuff, int scnt, MPI_Datatype stype,
int MPI_Allgather(MPICH2_CONST void* sbuff, int scnt, MPI_Datatype stype,
void* rbuff, int rcnt, MPI_Datatype rtype,
MPI_Comm comm )
{
......
......@@ -4,8 +4,8 @@
*/
#include "collchk.h"
int MPI_Allgatherv( void* sbuff, int scnt, MPI_Datatype stype,
void* rbuff, int *rcnts, int *displs, MPI_Datatype rtype,
int MPI_Allgatherv( MPICH2_CONST void* sbuff, int scnt, MPI_Datatype stype,
void* rbuff, MPICH2_CONST int *rcnts, MPICH2_CONST int *displs, MPI_Datatype rtype,
MPI_Comm comm )
{
char call[COLLCHK_SM_STRLEN];
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int MPI_Allreduce( void* sbuff, void* rbuff, int cnt,
int MPI_Allreduce( MPICH2_CONST void* sbuff, void* rbuff, int cnt,
MPI_Datatype dt, MPI_Op op, MPI_Comm comm)
{
int g2g = 1;
......
......@@ -6,7 +6,7 @@
#define BUFFS_NOT_SHARED 0
int MPI_Alltoall( void* sbuff, int scnt, MPI_Datatype stype,
int MPI_Alltoall( MPICH2_CONST void* sbuff, int scnt, MPI_Datatype stype,
void* rbuff, int rcnt, MPI_Datatype rtype,
MPI_Comm comm)
{
......
......@@ -4,8 +4,8 @@
*/
#include "collchk.h"
int MPI_Alltoallv(void* sbuff, int *scnts, int *sdispls, MPI_Datatype stype,
void* rbuff, int *rcnts, int *rdispls, MPI_Datatype rtype,
int MPI_Alltoallv(MPICH2_CONST void* sbuff, MPICH2_CONST int *scnts, MPICH2_CONST int *sdispls, MPI_Datatype stype,
void* rbuff, MPICH2_CONST int *rcnts, MPICH2_CONST int *rdispls, MPI_Datatype rtype,
MPI_Comm comm)
{
int g2g = 1, rank;
......
......@@ -5,8 +5,8 @@
#include "collchk.h"
int MPI_Alltoallw(void* sbuff, int *scnts, int *sdispls, MPI_Datatype *stypes,
void* rbuff, int *rcnts, int *rdispls, MPI_Datatype *rtypes,
int MPI_Alltoallw(MPICH2_CONST void* sbuff, MPICH2_CONST int *scnts, MPICH2_CONST int *sdispls, MPICH2_CONST MPI_Datatype *stypes,
void* rbuff, MPICH2_CONST int *rcnts, MPICH2_CONST int *rdispls, MPICH2_CONST MPI_Datatype *rtypes,
MPI_Comm comm)
{
int g2g = 1, r;
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int MPI_Cart_create(MPI_Comm comm_old, int ndims, int *dims, int *periods,
int MPI_Cart_create(MPI_Comm comm_old, int ndims, MPICH2_CONST int *dims, MPICH2_CONST int *periods,
int reorder, MPI_Comm *comm_cart)
{
int g2g = 1;
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int MPI_Cart_map(MPI_Comm comm, int ndims, int *dims, int *periods,
int MPI_Cart_map(MPI_Comm comm, int ndims, MPICH2_CONST int *dims, MPICH2_CONST int *periods,
int *newrank)
{
int g2g = 1;
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int CollChk_check_buff(MPI_Comm comm, void *buff, char* call)
int CollChk_check_buff(MPI_Comm comm, const void *buff, char* call)
{
#if defined( HAVE_MPI_IN_PLACE )
int num_buffs_in_place;
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int CollChk_check_dims(MPI_Comm comm, int ndims, int *dims, char* call)
int CollChk_check_dims(MPI_Comm comm, int ndims, const int *dims, char* call)
{
char err_str[COLLCHK_STD_STRLEN], check[COLLCHK_SM_STRLEN];
int i;
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int CollChk_check_graph(MPI_Comm comm, int nnodes, int *index, int* edges,
int CollChk_check_graph(MPI_Comm comm, int nnodes, const int *index, const int* edges,
char* call)
{
char err_str[COLLCHK_STD_STRLEN], check[COLLCHK_SM_STRLEN];
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int MPI_Comm_accept(char *portname, MPI_Info info, int root,
int MPI_Comm_accept(MPICH2_CONST char *portname, MPI_Info info, int root,
MPI_Comm comm, MPI_Comm *newcomm)
{
int g2g = 1;
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int MPI_Comm_connect(char *portname, MPI_Info info, int root,
int MPI_Comm_connect(MPICH2_CONST char *portname, MPI_Info info, int root,
MPI_Comm comm, MPI_Comm *newcomm)
{
int g2g = 1;
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int MPI_Comm_spawn(char *command, char **argv, int maxprocs, MPI_Info info,
int MPI_Comm_spawn(MPICH2_CONST char *command, char **argv, int maxprocs, MPI_Info info,
int root, MPI_Comm comm, MPI_Comm *intercomm,
int *array_of_errcodes)
{
......
......@@ -5,7 +5,7 @@
#include "collchk.h"
int MPI_Comm_spawn_multiple(int count, char **array_of_commands,
char ***array_of_argv, int *array_of_maxprocs,
char ***array_of_argv, MPICH2_CONST int *array_of_maxprocs,
MPI_Info *array_of_info, int root, MPI_Comm comm,
MPI_Comm *intercomm, int *array_of_errcodes)
{
......
......@@ -4,7 +4,7 @@
*/
#include "collchk.h"
int MPI_Exscan(void* sbuff, void* rbuff, int cnt,
int MPI_Exscan(MPICH2_CONST void* sbuff, void* rbuff, int cnt,
MPI_Datatype dt, MPI_Op op, MPI_Comm comm)
{
int g2g = 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment