1
1

Rearrange the #include to minimize clutter.

This commit was SVN r29286.
Этот коммит содержится в:
George Bosilca 2013-09-28 17:15:33 +00:00
родитель 43b4d76913
Коммит 90c42bf762
15 изменённых файлов: 43 добавлений и 57 удалений

Просмотреть файл

@ -39,10 +39,7 @@
#endif
#include "ompi/constants.h"
#include "opal/class/opal_pointer_array.h"
#include "opal/class/opal_hash_table.h"
#include "opal/datatype/opal_convertor.h"
#include "opal/datatype/opal_datatype.h"
#include "mpi.h"
BEGIN_C_DECLS
@ -177,31 +174,8 @@ ompi_datatype_add( ompi_datatype_t* pdtBase, const ompi_datatype_t* pdtAdd, uint
return opal_datatype_add( &pdtBase->super, &pdtAdd->super, count, disp, extent );
}
static inline int32_t
ompi_datatype_duplicate( const ompi_datatype_t* oldType, ompi_datatype_t** newType )
{
ompi_datatype_t * new_ompi_datatype = ompi_datatype_create( oldType->super.desc.used + 2 );
*newType = new_ompi_datatype;
if( NULL == new_ompi_datatype ) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
opal_datatype_clone( &oldType->super, &new_ompi_datatype->super);
/* Strip the predefined flag at the OMPI level. */
new_ompi_datatype->super.flags &= ~OMPI_DATATYPE_FLAG_PREDEFINED;
/* By default maintain the relationships related to the old data (such as ops) */
new_ompi_datatype->id = oldType->id;
/* Set the keyhash to NULL -- copying attributes is *only* done at
the top level (specifically, MPI_TYPE_DUP). */
new_ompi_datatype->d_keyhash = NULL;
new_ompi_datatype->args = NULL;
snprintf (new_ompi_datatype->name, MPI_MAX_OBJECT_NAME, "Dup %s",
oldType->name);
return OMPI_SUCCESS;
}
OMPI_DECLSPEC int32_t
ompi_datatype_duplicate( const ompi_datatype_t* oldType, ompi_datatype_t** newType );
OMPI_DECLSPEC int32_t ompi_datatype_create_contiguous( int count, const ompi_datatype_t* oldType, ompi_datatype_t** newType );
OMPI_DECLSPEC int32_t ompi_datatype_create_vector( int count, int bLength, int stride,

Просмотреть файл

@ -24,8 +24,6 @@
#include <stddef.h>
#include "mpi.h"
#include "opal/align.h"
#include "opal/types.h"
#include "opal/util/arch.h"

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2010 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -24,7 +24,6 @@
#include <string.h>
#endif
#include "ompi/constants.h"
#include "opal/class/opal_pointer_array.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/attribute/attribute.h"
@ -87,3 +86,29 @@ int32_t ompi_datatype_destroy( ompi_datatype_t** type)
*type = NULL;
return OMPI_SUCCESS;
}
int32_t
ompi_datatype_duplicate( const ompi_datatype_t* oldType, ompi_datatype_t** newType )
{
ompi_datatype_t * new_ompi_datatype = ompi_datatype_create( oldType->super.desc.used + 2 );
*newType = new_ompi_datatype;
if( NULL == new_ompi_datatype ) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
opal_datatype_clone( &oldType->super, &new_ompi_datatype->super);
/* Strip the predefined flag at the OMPI level. */
new_ompi_datatype->super.flags &= ~OMPI_DATATYPE_FLAG_PREDEFINED;
/* By default maintain the relationships related to the old data (such as ops) */
new_ompi_datatype->id = oldType->id;
/* Set the keyhash to NULL -- copying attributes is *only* done at
the top level (specifically, MPI_TYPE_DUP). */
new_ompi_datatype->d_keyhash = NULL;
new_ompi_datatype->args = NULL;
snprintf (new_ompi_datatype->name, MPI_MAX_OBJECT_NAME, "Dup %s",
oldType->name);
return OMPI_SUCCESS;
}

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2009 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -20,7 +20,6 @@
*/
#include "ompi_config.h"
#include "ompi/constants.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/datatype/ompi_datatype_internal.h"
#include "mpi.h"

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -24,7 +24,6 @@
#include <stddef.h>
#include "ompi/constants.h"
#include "ompi/datatype/ompi_datatype.h"
static int

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2010 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -24,7 +24,6 @@
#include <stddef.h>
#include "ompi/constants.h"
#include "ompi/datatype/ompi_datatype.h"

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2009 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -24,7 +24,6 @@
#include <stddef.h>
#include "ompi/constants.h"
#include "ompi/datatype/ompi_datatype.h"
int32_t ompi_datatype_create_struct( int count, const int* pBlockLength, const OPAL_PTRDIFF_TYPE* pDisp,

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -24,7 +24,6 @@
#include <stddef.h>
#include "ompi/constants.h"
#include "ompi/datatype/ompi_datatype.h"
int32_t ompi_datatype_create_subarray(int ndims,

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2009 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -24,7 +24,6 @@
#include <stddef.h>
#include "ompi/constants.h"
#include "ompi/datatype/ompi_datatype.h"
/* Open questions ...

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2009 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -20,8 +20,6 @@
#include "ompi_config.h"
#include "ompi/constants.h"
#include "opal/datatype/opal_convertor.h"
#include "opal/util/arch.h"
#include "ompi/datatype/ompi_datatype.h"

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2010 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
@ -24,8 +24,6 @@
#include <limits.h>
#include "ompi/runtime/params.h"
#include "ompi/communicator/communicator.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/datatype/ompi_datatype.h"
int ompi_datatype_get_elements (ompi_datatype_t *datatype, size_t ucount, size_t *count)

Просмотреть файл

@ -1,6 +1,6 @@
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2009-2010 The University of Tennessee and The University
* Copyright (c) 2009-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
@ -26,7 +26,6 @@
#define OMPI_DATATYPE_INTERNAL_H
#include "opal/datatype/opal_datatype_internal.h"
#include "ompi/class/ompi_free_list.h"
/*
* This is the OMPI-layered numbering of ALL supported MPI types

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2009 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -20,6 +20,7 @@
*/
#include "ompi_config.h"
#include "opal/class/opal_pointer_array.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/datatype/ompi_datatype_internal.h"

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2010 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -27,9 +27,9 @@
#include <stddef.h>
#include <stdio.h>
#include "ompi/constants.h"
#include "opal/datatype/opal_convertor_internal.h"
#include "opal/util/output.h"
#include "opal/class/opal_pointer_array.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/datatype/ompi_datatype_internal.h"

Просмотреть файл

@ -3,7 +3,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2009 The University of Tennessee and The University
* Copyright (c) 2004-2013 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2006 High Performance Computing Center Stuttgart,
@ -20,7 +20,6 @@
#include "ompi_config.h"
#include "ompi/constants.h"
#include "opal/datatype/opal_datatype.h"
#include "opal/datatype/opal_datatype_internal.h"
#include "opal/datatype/opal_convertor.h"