Fix OPAL_PROCESS_NAME_xTOy for heterogeneous support
This commit was SVN r32425.
Этот коммит содержится в:
родитель
13b104bdef
Коммит
3c2e75c6b7
@ -3,6 +3,8 @@
|
|||||||
* of Tennessee Research Foundation. All rights
|
* of Tennessee Research Foundation. All rights
|
||||||
* reserved.
|
* reserved.
|
||||||
* Copyright (c) 2013 Inria. All rights reserved.
|
* Copyright (c) 2013 Inria. All rights reserved.
|
||||||
|
* Copyright (c) 2014 Research Organization for Information Science
|
||||||
|
* and Technology (RIST). All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -18,6 +20,10 @@
|
|||||||
#include "opal/mca/hwloc/hwloc.h"
|
#include "opal/mca/hwloc/hwloc.h"
|
||||||
#include "opal/dss/dss.h"
|
#include "opal/dss/dss.h"
|
||||||
|
|
||||||
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a transparent handle proposed to the upper layer as a mean
|
* This is a transparent handle proposed to the upper layer as a mean
|
||||||
* to store whatever information it needs in order to efficiently
|
* to store whatever information it needs in order to efficiently
|
||||||
@ -28,8 +34,27 @@
|
|||||||
*/
|
*/
|
||||||
typedef opal_identifier_t opal_process_name_t;
|
typedef opal_identifier_t opal_process_name_t;
|
||||||
|
|
||||||
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && !defined(WORDS_BIGENDIAN)
|
||||||
|
#define OPAL_PROCESS_NAME_NTOH(guid) opal_process_name_ntoh_intr(&(guid))
|
||||||
|
static inline __opal_attribute_always_inline__ void
|
||||||
|
opal_process_name_ntoh_intr(opal_process_name_t *name)
|
||||||
|
{
|
||||||
|
uint32_t * w = (uint32_t *)name;
|
||||||
|
w[0] = ntohl(w[0]);
|
||||||
|
w[1] = ntohl(w[1]);
|
||||||
|
}
|
||||||
|
#define OPAL_PROCESS_NAME_HTON(guid) opal_process_name_hton_intr(&(guid))
|
||||||
|
static inline __opal_attribute_always_inline__ void
|
||||||
|
opal_process_name_hton_intr(opal_process_name_t *name)
|
||||||
|
{
|
||||||
|
uint32_t * w = (uint32_t *)name;
|
||||||
|
w[0] = htonl(w[0]);
|
||||||
|
w[1] = htonl(w[1]);
|
||||||
|
}
|
||||||
|
#else
|
||||||
#define OPAL_PROCESS_NAME_NTOH(guid)
|
#define OPAL_PROCESS_NAME_NTOH(guid)
|
||||||
#define OPAL_PROCESS_NAME_HTON(guid)
|
#define OPAL_PROCESS_NAME_HTON(guid)
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct opal_proc_t {
|
typedef struct opal_proc_t {
|
||||||
/** allow proc to be placed on a list */
|
/** allow proc to be placed on a list */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user