c8bb7537e7
#define CACHE_LINE_SIZE to 128. This name has a conflict on NetBSD, and it seems kinda odd to have a header file that ''only'' defines a single value. Also, we'll soon be raising hwloc to be a first-class item, so having this file around seemed kinda weird. Therefore, I replaced CACHE_LINE_SIZE with opal_cache_line_size, an int (in opal/runtime/opal_init.c and opal/runtime/opal.h) on the rationale that we can fill this in at runtime with hwloc info (trunk and v1.5/beyond, only). The only place we ''needed'' a compile-time CACHE_LINE_SIZE was in the BTL SM (for struct padding), so I made a new BTL_SM_ preprocessor macro with the old CACHE_LINE_SIZE value (128). That use isn't suitable for run-time hwloc information, anyway. This commit was SVN r23349.
96 строки
2.6 KiB
C
96 строки
2.6 KiB
C
/*
|
|
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
|
* University Research and Technology
|
|
* Corporation. All rights reserved.
|
|
* Copyright (c) 2004-2007 The University of Tennessee and The University
|
|
* of Tennessee Research Foundation. All rights
|
|
* reserved.
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
* University of Stuttgart. All rights reserved.
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
* All rights reserved.
|
|
* Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
|
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
/** @file **/
|
|
|
|
#ifndef OPAL_H
|
|
#define OPAL_H
|
|
|
|
#include "opal_config.h"
|
|
|
|
BEGIN_C_DECLS
|
|
|
|
/** version string of opal */
|
|
OPAL_DECLSPEC extern const char opal_version_string[];
|
|
|
|
/* profile flag */
|
|
OPAL_DECLSPEC extern bool opal_profile;
|
|
OPAL_DECLSPEC extern char *opal_profile_file;
|
|
|
|
/* Size of a cache line. To be replaced with real hwloc info (in
|
|
trunk/v1.5 and beyond, only), but for the moment, just move it here
|
|
so that we can remove opal/include/sys/cache.h whose only purpose
|
|
is life is to #define CACHE_LINE_SIZE (and has a conflict on
|
|
NetBSD). */
|
|
OPAL_DECLSPEC extern int opal_cache_line_size;
|
|
|
|
/**
|
|
* Initialize the OPAL layer, including the MCA system.
|
|
*
|
|
* @retval OPAL_SUCCESS Upon success.
|
|
* @retval OPAL_ERROR Upon failure.
|
|
*
|
|
* \note If this function is called, opal_init_util() should *not* be
|
|
* called.
|
|
*/
|
|
OPAL_DECLSPEC int opal_init(int* pargc, char*** pargv);
|
|
|
|
/**
|
|
* Finalize the OPAL layer, including the MCA system.
|
|
*
|
|
* @retval OPAL_SUCCESS Upon success.
|
|
* @retval OPAL_ERROR Upon failure.
|
|
*
|
|
* \note If this function is called, opal_finalize_util() should *not*
|
|
* be called.
|
|
*/
|
|
OPAL_DECLSPEC int opal_finalize(void);
|
|
|
|
/**
|
|
* Initialize the OPAL layer, excluding the MCA system.
|
|
*
|
|
* @retval OPAL_SUCCESS Upon success.
|
|
* @retval OPAL_ERROR Upon failure.
|
|
*
|
|
* \note If this function is called, opal_init() should *not*
|
|
* be called.
|
|
*/
|
|
OPAL_DECLSPEC int opal_init_util(int* pargc, char*** pargv);
|
|
|
|
/**
|
|
* Finalize the OPAL layer, excluding the MCA system.
|
|
*
|
|
* @retval OPAL_SUCCESS Upon success.
|
|
* @retval OPAL_ERROR Upon failure.
|
|
*
|
|
* \note If this function is called, opal_finalize() should *not*
|
|
* be called.
|
|
*/
|
|
OPAL_DECLSPEC int opal_finalize_util(void);
|
|
|
|
/**
|
|
* Internal function. Do not call.
|
|
*/
|
|
OPAL_DECLSPEC int opal_register_params(void);
|
|
|
|
END_C_DECLS
|
|
|
|
#endif
|