Allow Open MPI to deal with size_t internally.
This commit was SVN r26097.
Этот коммит содержится в:
родитель
24bfb3e77b
Коммит
e8c358c188
@ -1,6 +1,6 @@
|
|||||||
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2010 The University of Tennessee and The University
|
* Copyright (c) 2009-2012 The University of Tennessee and The University
|
||||||
* of Tennessee Research Foundation. All rights
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||||
@ -278,10 +278,18 @@ ompi_datatype_set_element_count( const ompi_datatype_t* type, uint32_t count, si
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline int32_t
|
static inline int32_t
|
||||||
ompi_datatype_copy_content_same_ddt( const ompi_datatype_t* type, int32_t count,
|
ompi_datatype_copy_content_same_ddt( const ompi_datatype_t* type, size_t count,
|
||||||
char* pDestBuf, char* pSrcBuf )
|
char* pDestBuf, char* pSrcBuf )
|
||||||
{
|
{
|
||||||
return opal_datatype_copy_content_same_ddt( &type->super, count, pDestBuf, pSrcBuf );
|
int32_t length, rc;
|
||||||
|
|
||||||
|
while( 0 != count ) {
|
||||||
|
length = INT_MAX;
|
||||||
|
if( ((size_t)length) > count ) length = (int32_t)count;
|
||||||
|
rc = opal_datatype_copy_content_same_ddt( &type->super, count, pDestBuf, pSrcBuf );
|
||||||
|
if( 0 != rc ) return rc;
|
||||||
|
count -= (size_t)length;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OMPI_DECLSPEC const ompi_datatype_t* ompi_datatype_match_size( int size, uint16_t datakind, uint16_t datalang );
|
OMPI_DECLSPEC const ompi_datatype_t* ompi_datatype_match_size( int size, uint16_t datakind, uint16_t datalang );
|
||||||
|
@ -27,10 +27,10 @@
|
|||||||
#include "ompi/mca/pml/pml.h"
|
#include "ompi/mca/pml/pml.h"
|
||||||
#include "coll_tuned_util.h"
|
#include "coll_tuned_util.h"
|
||||||
|
|
||||||
int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount,
|
int ompi_coll_tuned_sendrecv_actual( void* sendbuf, size_t scount,
|
||||||
ompi_datatype_t* sdatatype,
|
ompi_datatype_t* sdatatype,
|
||||||
int dest, int stag,
|
int dest, int stag,
|
||||||
void* recvbuf, int rcount,
|
void* recvbuf, size_t rcount,
|
||||||
ompi_datatype_t* rdatatype,
|
ompi_datatype_t* rdatatype,
|
||||||
int source, int rtag,
|
int source, int rtag,
|
||||||
struct ompi_communicator_t* comm,
|
struct ompi_communicator_t* comm,
|
||||||
@ -96,10 +96,10 @@ int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount,
|
|||||||
* version when available
|
* version when available
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount,
|
int ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, size_t scount,
|
||||||
ompi_datatype_t* sdatatype,
|
ompi_datatype_t* sdatatype,
|
||||||
int dest, int stag,
|
int dest, int stag,
|
||||||
void* recvbuf, int rcount,
|
void* recvbuf, size_t rcount,
|
||||||
ompi_datatype_t* rdatatype,
|
ompi_datatype_t* rdatatype,
|
||||||
int source, int rtag,
|
int source, int rtag,
|
||||||
struct ompi_communicator_t* comm,
|
struct ompi_communicator_t* comm,
|
||||||
|
@ -30,10 +30,10 @@
|
|||||||
BEGIN_C_DECLS
|
BEGIN_C_DECLS
|
||||||
|
|
||||||
/* prototypes */
|
/* prototypes */
|
||||||
int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount,
|
int ompi_coll_tuned_sendrecv_actual( void* sendbuf, size_t scount,
|
||||||
ompi_datatype_t* sdatatype,
|
ompi_datatype_t* sdatatype,
|
||||||
int dest, int stag,
|
int dest, int stag,
|
||||||
void* recvbuf, int rcount,
|
void* recvbuf, size_t rcount,
|
||||||
ompi_datatype_t* rdatatype,
|
ompi_datatype_t* rdatatype,
|
||||||
int source, int rtag,
|
int source, int rtag,
|
||||||
struct ompi_communicator_t* comm,
|
struct ompi_communicator_t* comm,
|
||||||
@ -43,9 +43,9 @@ int ompi_coll_tuned_sendrecv_actual( void* sendbuf, int scount,
|
|||||||
/* inline functions */
|
/* inline functions */
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
ompi_coll_tuned_sendrecv( void* sendbuf, int scount, ompi_datatype_t* sdatatype,
|
ompi_coll_tuned_sendrecv( void* sendbuf, size_t scount, ompi_datatype_t* sdatatype,
|
||||||
int dest, int stag,
|
int dest, int stag,
|
||||||
void* recvbuf, int rcount, ompi_datatype_t* rdatatype,
|
void* recvbuf, size_t rcount, ompi_datatype_t* rdatatype,
|
||||||
int source, int rtag,
|
int source, int rtag,
|
||||||
struct ompi_communicator_t* comm,
|
struct ompi_communicator_t* comm,
|
||||||
ompi_status_public_t* status, int myid )
|
ompi_status_public_t* status, int myid )
|
||||||
@ -61,10 +61,10 @@ ompi_coll_tuned_sendrecv( void* sendbuf, int scount, ompi_datatype_t* sdatatype,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount,
|
ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, size_t scount,
|
||||||
ompi_datatype_t* sdatatype,
|
ompi_datatype_t* sdatatype,
|
||||||
int dest, int stag,
|
int dest, int stag,
|
||||||
void* recvbuf, int rcount,
|
void* recvbuf, size_t rcount,
|
||||||
ompi_datatype_t* rdatatype,
|
ompi_datatype_t* rdatatype,
|
||||||
int source, int rtag,
|
int source, int rtag,
|
||||||
struct ompi_communicator_t* comm,
|
struct ompi_communicator_t* comm,
|
||||||
@ -74,10 +74,10 @@ ompi_coll_tuned_sendrecv_actual_localcompleted( void* sendbuf, int scount,
|
|||||||
/* inline functions */
|
/* inline functions */
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
ompi_coll_tuned_sendrecv_localcompleted( void* sendbuf, int scount,
|
ompi_coll_tuned_sendrecv_localcompleted( void* sendbuf, size_t scount,
|
||||||
ompi_datatype_t* sdatatype,
|
ompi_datatype_t* sdatatype,
|
||||||
int dest, int stag,
|
int dest, int stag,
|
||||||
void* recvbuf, int rcount,
|
void* recvbuf, size_t rcount,
|
||||||
ompi_datatype_t* rdatatype,
|
ompi_datatype_t* rdatatype,
|
||||||
int source, int rtag,
|
int source, int rtag,
|
||||||
struct ompi_communicator_t* comm,
|
struct ompi_communicator_t* comm,
|
||||||
@ -98,9 +98,9 @@ ompi_coll_tuned_sendrecv_localcompleted( void* sendbuf, int scount,
|
|||||||
|
|
||||||
/* inline functions */
|
/* inline functions */
|
||||||
static inline int
|
static inline int
|
||||||
ompi_coll_tuned_isendrecv( void* sendbuf, int scount, ompi_datatype_t* sdtype,
|
ompi_coll_tuned_isendrecv( void* sendbuf, size_t scount, ompi_datatype_t* sdtype,
|
||||||
int dest, int stag, ompi_request_t** sreq,
|
int dest, int stag, ompi_request_t** sreq,
|
||||||
void* recvbuf, int rcount, ompi_datatype_t* rdtype,
|
void* recvbuf, size_t rcount, ompi_datatype_t* rdtype,
|
||||||
int source, int rtag, ompi_request_t** rreq,
|
int source, int rtag, ompi_request_t** rreq,
|
||||||
struct ompi_communicator_t* comm ) {
|
struct ompi_communicator_t* comm ) {
|
||||||
int ret, line;
|
int ret, line;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user