Cleanup the dss by removing unused functions
This commit was SVN r26644.
Этот коммит содержится в:
родитель
9680c52f5e
Коммит
abe7dd8274
@ -10,6 +10,7 @@
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -29,16 +30,12 @@ libopen_pal_la_SOURCES += \
|
||||
dss/dss_compare.c \
|
||||
dss/dss_copy.c \
|
||||
dss/dss_dump.c \
|
||||
dss/dss_get.c \
|
||||
dss/dss_load_unload.c \
|
||||
dss/dss_lookup.c \
|
||||
dss/dss_pack.c \
|
||||
dss/dss_peek.c \
|
||||
dss/dss_print.c \
|
||||
dss/dss_register.c \
|
||||
dss/dss_release.c \
|
||||
dss/dss_set.c \
|
||||
dss/dss_set_buffer_type.c \
|
||||
dss/dss_size.c \
|
||||
dss/dss_unpack.c \
|
||||
dss/dss_open_close.c
|
||||
|
@ -32,27 +32,6 @@
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
/**
|
||||
* Set the buffer type.
|
||||
*
|
||||
* The pack/unpack functions can work with two types of buffer - fully
|
||||
* described (i.e., every data object is preceeded by an identifier as
|
||||
* to the type of the object) and non-described (i.e., no type
|
||||
* identifier included). This function allows the caller to set the
|
||||
* buffer type to the specified type - the function first checks to
|
||||
* ensure the buffer is empty as the type cannot be changed once
|
||||
* data has already entered the buffer.
|
||||
*
|
||||
* @param *buffer A pointer to the buffer
|
||||
*
|
||||
* @param type The new buffer type
|
||||
*
|
||||
* @retval OPAL_SUCCESS Operation successfully executed
|
||||
*
|
||||
* @retval OPAL_ERROR_VALUE An appropriate error code
|
||||
*/
|
||||
typedef int (*opal_dss_set_buffer_type_fn_t)(opal_buffer_t *buffer, opal_dss_buffer_type_t type);
|
||||
|
||||
/**
|
||||
* Top-level itnerface function to pack one or more values into a
|
||||
* buffer.
|
||||
@ -449,50 +428,6 @@ typedef int (*opal_dss_print_fn_t)(char **output, char *prefix, void *src, opal_
|
||||
*/
|
||||
typedef int (*opal_dss_dump_fn_t)(int output_stream, void *src, opal_data_type_t type);
|
||||
|
||||
/**
|
||||
* Set a data value
|
||||
*
|
||||
* Since the data values are stored in an opaque manner, the system needs
|
||||
* a function by which it can set the data value to a specific value. This
|
||||
* is the equivalent to a C++ access function.
|
||||
*
|
||||
* NOTE: this function does NOT allocate any memory. It only sets the value pointer
|
||||
* and type to the specified location and type. Use "copy" if you want dynamic allocation
|
||||
* of storage.
|
||||
*
|
||||
* @retval OPAL_SUCCESS The value was successfully stored
|
||||
*
|
||||
* @retval OPAL_ERROR(s) An appropriate error code.
|
||||
*/
|
||||
typedef int (*opal_dss_set_fn_t)(opal_dss_value_t *value, void *new_value, opal_data_type_t type);
|
||||
|
||||
/**
|
||||
* Get a data value
|
||||
*
|
||||
* Since the data values are stored in an opaque manner, the system needs
|
||||
* a function by which it can get the data value from within the data_value object. This
|
||||
* is the equivalent to a C++ access function.
|
||||
*
|
||||
* NOTE: this function does NOT allocate any memory. It simply points the "data" location
|
||||
* to that of the value, after ensuring that the value's type matches the specified one.
|
||||
* Use "copy" if you want dynamic allocation of memory.
|
||||
*
|
||||
* @retval OPAL_SUCCESS The value was successfully retrieved
|
||||
*
|
||||
* @retval OPAL_ERROR(s) An appropriate error code - usually caused by the specified type
|
||||
* not matching the data type within the stored object.
|
||||
*/
|
||||
typedef int (*opal_dss_get_fn_t)(void **data, opal_dss_value_t *value, opal_data_type_t type);
|
||||
|
||||
/**
|
||||
* Release the storage used by a data value
|
||||
*
|
||||
* Since the data values are stored in an opaque manner, the system needs
|
||||
* a function by which it can release the storage associated with a value
|
||||
* stored in a data value object.
|
||||
*/
|
||||
typedef void (*opal_dss_release_fn_t)(opal_dss_value_t *value);
|
||||
|
||||
/**
|
||||
* Register a set of data handling functions.
|
||||
*
|
||||
@ -509,7 +444,6 @@ typedef void (*opal_dss_release_fn_t)(opal_dss_value_t *value);
|
||||
* deserialize individual members). This is likewise true for the copy
|
||||
* and compare functions.
|
||||
*
|
||||
* @param release_fn [IN] Function pointer to the release routine
|
||||
* @param pack_fn [IN] Function pointer to the pack routine
|
||||
* @param unpack_fn [IN] Function pointer to the unpack routine
|
||||
* @param copy_fn [IN] Function pointer to copy routine
|
||||
@ -531,7 +465,6 @@ typedef int (*opal_dss_register_fn_t)(opal_dss_pack_fn_t pack_fn,
|
||||
opal_dss_compare_fn_t compare_fn,
|
||||
opal_dss_size_fn_t size_fn,
|
||||
opal_dss_print_fn_t print_fn,
|
||||
opal_dss_release_fn_t release_fn,
|
||||
bool structured,
|
||||
const char *name, opal_data_type_t *type);
|
||||
/*
|
||||
@ -545,6 +478,8 @@ typedef char* (*opal_dss_lookup_data_type_fn_t)(opal_data_type_t type);
|
||||
*/
|
||||
typedef void (*opal_dss_dump_data_types_fn_t)(int output);
|
||||
|
||||
/* return true if the data type is structured */
|
||||
typedef bool (*opal_dss_structured_fn_t)(opal_data_type_t type);
|
||||
|
||||
/**
|
||||
* Base structure for the DSS
|
||||
@ -553,16 +488,13 @@ typedef void (*opal_dss_dump_data_types_fn_t)(int output);
|
||||
* pointers to the calling interface.
|
||||
*/
|
||||
struct opal_dss_t {
|
||||
opal_dss_set_fn_t set;
|
||||
opal_dss_get_fn_t get;
|
||||
opal_dss_set_buffer_type_fn_t set_buffer_type;
|
||||
opal_dss_pack_fn_t pack;
|
||||
opal_dss_unpack_fn_t unpack;
|
||||
opal_dss_copy_fn_t copy;
|
||||
opal_dss_compare_fn_t compare;
|
||||
opal_dss_size_fn_t size;
|
||||
opal_dss_print_fn_t print;
|
||||
opal_dss_release_fn_t release;
|
||||
opal_dss_structured_fn_t structured;
|
||||
opal_dss_peek_next_item_fn_t peek;
|
||||
opal_dss_unload_fn_t unload;
|
||||
opal_dss_load_fn_t load;
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -210,18 +211,6 @@ int opal_dss_compare_dt(opal_data_type_t *value1, opal_data_type_t *value2, opal
|
||||
return OPAL_EQUAL;
|
||||
}
|
||||
|
||||
/* OPAL_DATA_VALUE */
|
||||
int opal_dss_compare_data_value(opal_dss_value_t *value1, opal_dss_value_t *value2, opal_data_type_t type)
|
||||
{
|
||||
/* can't compare if the two types don't match */
|
||||
if (value1->type != value2->type) {
|
||||
return OPAL_ERR_TYPE_MISMATCH;
|
||||
}
|
||||
|
||||
/* okay, go ahead and compare the values themselves */
|
||||
return opal_dss.compare(value1->data, value2->data, value1->type);
|
||||
}
|
||||
|
||||
/* OPAL_BYTE_OBJECT */
|
||||
int opal_dss_compare_byte_object(opal_byte_object_t *value1, opal_byte_object_t *value2, opal_data_type_t type)
|
||||
{
|
||||
|
@ -145,32 +145,6 @@ int opal_dss_copy_string(char **dest, char *src, opal_data_type_t type)
|
||||
|
||||
/* COPY FUNCTIONS FOR GENERIC OPAL TYPES */
|
||||
|
||||
/*
|
||||
* OPAL_DATA_VALUE
|
||||
*/
|
||||
int opal_dss_copy_data_value(opal_dss_value_t **dest, opal_dss_value_t *src,
|
||||
opal_data_type_t type)
|
||||
{
|
||||
int rc;
|
||||
|
||||
/* create the new object */
|
||||
*dest = OBJ_NEW(opal_dss_value_t);
|
||||
if (NULL == *dest) {
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
(*dest)->type = src->type;
|
||||
|
||||
/* copy the payload with its associated copy function */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.copy(&((*dest)->data), src->data, src->type))) {
|
||||
OBJ_RELEASE(*dest);
|
||||
return rc;
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* OPAL_BYTE_OBJECT
|
||||
*/
|
||||
|
@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "opal_config.h"
|
||||
|
||||
#include "opal/dss/dss_internal.h"
|
||||
|
||||
int opal_dss_get(void **data, opal_dss_value_t *value, opal_data_type_t type)
|
||||
{
|
||||
/* check for error */
|
||||
if (NULL == value || NULL == data) {
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
/* okay, we assume that the user has provided memory for the destination.
|
||||
* check to ensure the data types match.
|
||||
* this is absolutely critical as "get" will NOT allocate space
|
||||
* but will assume that *data contains a valid address for the
|
||||
* type of data being requested
|
||||
*/
|
||||
if (type != value->type) {
|
||||
return OPAL_ERR_TYPE_MISMATCH;
|
||||
}
|
||||
|
||||
/* point the destination at the value */
|
||||
*data = value->data;
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -115,51 +116,51 @@ BEGIN_C_DECLS
|
||||
#endif
|
||||
|
||||
/* Unpack generic size macros */
|
||||
#define UNPACK_SIZE_MISMATCH(unpack_type, remote_type, ret) \
|
||||
do { \
|
||||
switch(remote_type) { \
|
||||
case OPAL_UINT8: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, uint8_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_INT8: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, int8_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_UINT16: \
|
||||
#define UNPACK_SIZE_MISMATCH(unpack_type, remote_type, ret) \
|
||||
do { \
|
||||
switch(remote_type) { \
|
||||
case OPAL_UINT8: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, uint8_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_INT8: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, int8_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_UINT16: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, uint16_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_INT16: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, int16_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_UINT32: \
|
||||
break; \
|
||||
case OPAL_INT16: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, int16_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_UINT32: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, uint32_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_INT32: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, int32_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_UINT64: \
|
||||
break; \
|
||||
case OPAL_INT32: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, int32_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_UINT64: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, uint64_t, remote_type); \
|
||||
break; \
|
||||
case OPAL_INT64: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, int64_t, remote_type); \
|
||||
break; \
|
||||
default: \
|
||||
ret = OPAL_ERR_NOT_FOUND; \
|
||||
} \
|
||||
} while (0)
|
||||
break; \
|
||||
case OPAL_INT64: \
|
||||
UNPACK_SIZE_MISMATCH_FOUND(unpack_type, int64_t, remote_type); \
|
||||
break; \
|
||||
default: \
|
||||
ret = OPAL_ERR_NOT_FOUND; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* NOTE: do not need to deal with endianness here, as the unpacking of
|
||||
the underling sender-side type will do that for us. Repeat: the
|
||||
data in tmpbuf[] is already in host byte order. */
|
||||
the underling sender-side type will do that for us. Repeat: the
|
||||
data in tmpbuf[] is already in host byte order. */
|
||||
#define UNPACK_SIZE_MISMATCH_FOUND(unpack_type, tmptype, tmpdsstype) \
|
||||
do { \
|
||||
int32_t i; \
|
||||
tmptype *tmpbuf = (tmptype*)malloc(sizeof(tmptype) * (*num_vals)); \
|
||||
ret = opal_dss_unpack_buffer(buffer, tmpbuf, num_vals, tmpdsstype); \
|
||||
for (i = 0 ; i < *num_vals ; ++i) { \
|
||||
((unpack_type*) dest)[i] = (unpack_type)(tmpbuf[i]); \
|
||||
} \
|
||||
free(tmpbuf); \
|
||||
} while (0)
|
||||
do { \
|
||||
int32_t i; \
|
||||
tmptype *tmpbuf = (tmptype*)malloc(sizeof(tmptype) * (*num_vals)); \
|
||||
ret = opal_dss_unpack_buffer(buffer, tmpbuf, num_vals, tmpdsstype); \
|
||||
for (i = 0 ; i < *num_vals ; ++i) { \
|
||||
((unpack_type*) dest)[i] = (unpack_type)(tmpbuf[i]); \
|
||||
} \
|
||||
free(tmpbuf); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/**
|
||||
@ -183,8 +184,6 @@ struct opal_dss_type_info_t {
|
||||
opal_dss_size_fn_t odti_size_fn;
|
||||
/** print function */
|
||||
opal_dss_print_fn_t odti_print_fn;
|
||||
/** Release function */
|
||||
opal_dss_release_fn_t odti_release_fn;
|
||||
/** flag to indicate structured data */
|
||||
bool odti_structured;
|
||||
};
|
||||
@ -205,293 +204,263 @@ extern int opal_dss_threshold_size;
|
||||
extern opal_pointer_array_t opal_dss_types;
|
||||
extern opal_data_type_t opal_dss_num_reg_types;
|
||||
|
||||
/*
|
||||
* Implementations of API functions
|
||||
*/
|
||||
/*
|
||||
* Implementations of API functions
|
||||
*/
|
||||
|
||||
int opal_dss_set(opal_dss_value_t *value, void *new_value, opal_data_type_t type);
|
||||
int opal_dss_pack(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals,
|
||||
opal_data_type_t type);
|
||||
int opal_dss_unpack(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *max_num_vals,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_get(void **data, opal_dss_value_t *value, opal_data_type_t type);
|
||||
int opal_dss_copy(void **dest, void *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_set_buffer_type(opal_buffer_t *buffer, opal_dss_buffer_type_t type);
|
||||
int opal_dss_compare(const void *value1, const void *value2,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals,
|
||||
opal_data_type_t type);
|
||||
int opal_dss_unpack(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *max_num_vals,
|
||||
opal_data_type_t type);
|
||||
int opal_dss_print(char **output, char *prefix, void *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy(void **dest, void *src, opal_data_type_t type);
|
||||
int opal_dss_dump(int output_stream, void *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare(const void *value1, const void *value2,
|
||||
opal_data_type_t type);
|
||||
int opal_dss_size(size_t *size, void *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_print(char **output, char *prefix, void *src, opal_data_type_t type);
|
||||
int opal_dss_peek(opal_buffer_t *buffer, opal_data_type_t *type,
|
||||
int32_t *number);
|
||||
|
||||
int opal_dss_dump(int output_stream, void *src, opal_data_type_t type);
|
||||
int opal_dss_peek_type(opal_buffer_t *buffer, opal_data_type_t *type);
|
||||
|
||||
int opal_dss_size(size_t *size, void *src, opal_data_type_t type);
|
||||
int opal_dss_unload(opal_buffer_t *buffer, void **payload,
|
||||
int32_t *bytes_used);
|
||||
int opal_dss_load(opal_buffer_t *buffer, void *payload, int32_t bytes_used);
|
||||
|
||||
int opal_dss_peek(opal_buffer_t *buffer, opal_data_type_t *type,
|
||||
int32_t *number);
|
||||
int opal_dss_copy_payload(opal_buffer_t *dest, opal_buffer_t *src);
|
||||
|
||||
int opal_dss_peek_type(opal_buffer_t *buffer, opal_data_type_t *type);
|
||||
int opal_dss_register(opal_dss_pack_fn_t pack_fn,
|
||||
opal_dss_unpack_fn_t unpack_fn,
|
||||
opal_dss_copy_fn_t copy_fn,
|
||||
opal_dss_compare_fn_t compare_fn,
|
||||
opal_dss_size_fn_t size_fn,
|
||||
opal_dss_print_fn_t print_fn,
|
||||
bool structured,
|
||||
const char *name, opal_data_type_t *type);
|
||||
|
||||
int opal_dss_unload(opal_buffer_t *buffer, void **payload,
|
||||
int32_t *bytes_used);
|
||||
int opal_dss_load(opal_buffer_t *buffer, void *payload, int32_t bytes_used);
|
||||
bool opal_dss_structured(opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_payload(opal_buffer_t *dest, opal_buffer_t *src);
|
||||
char *opal_dss_lookup_data_type(opal_data_type_t type);
|
||||
|
||||
int opal_dss_register(opal_dss_pack_fn_t pack_fn,
|
||||
opal_dss_unpack_fn_t unpack_fn,
|
||||
opal_dss_copy_fn_t copy_fn,
|
||||
opal_dss_compare_fn_t compare_fn,
|
||||
opal_dss_size_fn_t size_fn,
|
||||
opal_dss_print_fn_t print_fn,
|
||||
opal_dss_release_fn_t release_fn,
|
||||
bool structured,
|
||||
const char *name, opal_data_type_t *type);
|
||||
void opal_dss_dump_data_types(int output);
|
||||
|
||||
void opal_dss_release(opal_dss_value_t *value);
|
||||
|
||||
char *opal_dss_lookup_data_type(opal_data_type_t type);
|
||||
|
||||
void opal_dss_dump_data_types(int output);
|
||||
|
||||
/*
|
||||
* Specialized functions
|
||||
*/
|
||||
/*
|
||||
* Specialized functions
|
||||
*/
|
||||
OPAL_DECLSPEC int opal_dss_pack_buffer(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
OPAL_DECLSPEC int opal_dss_unpack_buffer(opal_buffer_t *buffer, void *dst,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
/*
|
||||
* Internal pack functions
|
||||
*/
|
||||
/*
|
||||
* Internal pack functions
|
||||
*/
|
||||
|
||||
int opal_dss_pack_null(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_byte(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_null(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_byte(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_bool(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_bool(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_int(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_int16(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_int32(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_int64(opal_buffer_t *buffer, const void *src,
|
||||
int opal_dss_pack_int(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_int16(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_int32(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_pack_int64(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_sizet(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_pid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_string(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_data_type(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_sizet(opal_buffer_t *buffer, const void *src,
|
||||
int opal_dss_pack_byte_object(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_pstat(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_node_stat(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_pid(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
/*
|
||||
* Internal unpack functions
|
||||
*/
|
||||
|
||||
int opal_dss_pack_string(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_null(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_byte(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_data_type(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_bool(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_data_value(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_int(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_int16(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_int32(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_int64(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_byte_object(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_sizet(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_pstat(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_pid(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_pack_node_stat(opal_buffer_t *buffer, const void *src,
|
||||
int32_t num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_string(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
/*
|
||||
* Internal unpack functions
|
||||
*/
|
||||
|
||||
int opal_dss_unpack_null(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_byte(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_bool(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_int(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_int16(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_int32(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_unpack_int64(opal_buffer_t *buffer, void *dest,
|
||||
int opal_dss_unpack_data_type(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_sizet(opal_buffer_t *buffer, void *dest,
|
||||
int opal_dss_unpack_byte_object(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_pstat(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_node_stat(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_pid(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
/*
|
||||
* Internal copy functions
|
||||
*/
|
||||
|
||||
int opal_dss_unpack_string(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_std_copy(void **dest, void *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_data_type(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_copy_null(char **dest, char *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_data_value(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_copy_string(char **dest, char *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_byte_object(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_copy_byte_object(opal_byte_object_t **dest, opal_byte_object_t *src,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_pstat(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
int opal_dss_copy_pstat(opal_pstats_t **dest, opal_pstats_t *src,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_unpack_node_stat(opal_buffer_t *buffer, void *dest,
|
||||
int32_t *num_vals, opal_data_type_t type);
|
||||
|
||||
/*
|
||||
* Internal copy functions
|
||||
*/
|
||||
|
||||
int opal_dss_std_copy(void **dest, void *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_null(char **dest, char *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_string(char **dest, char *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_byte_object(opal_byte_object_t **dest, opal_byte_object_t *src,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_data_value(opal_dss_value_t **dest, opal_dss_value_t *src,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_pstat(opal_pstats_t **dest, opal_pstats_t *src,
|
||||
int opal_dss_copy_node_stat(opal_node_stats_t **dest, opal_node_stats_t *src,
|
||||
opal_data_type_t type);
|
||||
|
||||
int opal_dss_copy_node_stat(opal_node_stats_t **dest, opal_node_stats_t *src,
|
||||
opal_data_type_t type);
|
||||
/*
|
||||
* Internal compare functions
|
||||
*/
|
||||
|
||||
/*
|
||||
* Internal compare functions
|
||||
*/
|
||||
int opal_dss_compare_bool(bool *value1, bool *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_bool(bool *value1, bool *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_int(int *value1, int *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint(unsigned int *value1, unsigned int *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_int(int *value1, int *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint(unsigned int *value1, unsigned int *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_size(size_t *value1, size_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_size(size_t *value1, size_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_pid(pid_t *value1, pid_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_pid(pid_t *value1, pid_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_byte(char *value1, char *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_char(char *value1, char *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_int8(int8_t *value1, int8_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint8(uint8_t *value1, uint8_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_byte(char *value1, char *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_char(char *value1, char *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_int8(int8_t *value1, int8_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint8(uint8_t *value1, uint8_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_int16(int16_t *value1, int16_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint16(uint16_t *value1, uint16_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_int16(int16_t *value1, int16_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint16(uint16_t *value1, uint16_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_int32(int32_t *value1, int32_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint32(uint32_t *value1, uint32_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_int32(int32_t *value1, int32_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint32(uint32_t *value1, uint32_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_int64(int64_t *value1, int64_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint64(uint64_t *value1, uint64_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_int64(int64_t *value1, int64_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_uint64(uint64_t *value1, uint64_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_null(char *value1, char *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_null(char *value1, char *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_string(char *value1, char *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_string(char *value1, char *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_dt(opal_data_type_t *value1, opal_data_type_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_dt(opal_data_type_t *value1, opal_data_type_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_byte_object(opal_byte_object_t *value1, opal_byte_object_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_data_value(opal_dss_value_t *value1, opal_dss_value_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_pstat(opal_pstats_t *value1, opal_pstats_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_byte_object(opal_byte_object_t *value1, opal_byte_object_t *value2, opal_data_type_t type);
|
||||
int opal_dss_compare_node_stat(opal_node_stats_t *value1, opal_node_stats_t *value2, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_pstat(opal_pstats_t *value1, opal_pstats_t *value2, opal_data_type_t type);
|
||||
/*
|
||||
* Internal size functions
|
||||
*/
|
||||
int opal_dss_std_size(size_t *size, void *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_compare_node_stat(opal_node_stats_t *value1, opal_node_stats_t *value2, opal_data_type_t type);
|
||||
int opal_dss_size_string(size_t *size, char *src, opal_data_type_t type);
|
||||
|
||||
/*
|
||||
* Internal size functions
|
||||
*/
|
||||
int opal_dss_std_size(size_t *size, void *src, opal_data_type_t type);
|
||||
int opal_dss_size_byte_object(size_t *size, opal_byte_object_t *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_size_string(size_t *size, char *src, opal_data_type_t type);
|
||||
int opal_dss_size_pstat(size_t *size, opal_pstats_t *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_size_data_value(size_t *size, opal_dss_value_t *src, opal_data_type_t type);
|
||||
int opal_dss_size_node_stat(size_t *size, opal_node_stats_t *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_size_byte_object(size_t *size, opal_byte_object_t *src, opal_data_type_t type);
|
||||
/*
|
||||
* Internal print functions
|
||||
*/
|
||||
int opal_dss_print_byte(char **output, char *prefix, uint8_t *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_size_pstat(size_t *size, opal_pstats_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_string(char **output, char *prefix, char *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_size_node_stat(size_t *size, opal_node_stats_t *src, opal_data_type_t type);
|
||||
|
||||
/*
|
||||
* Internal print functions
|
||||
*/
|
||||
int opal_dss_print_byte(char **output, char *prefix, uint8_t *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_print_string(char **output, char *prefix, char *src, opal_data_type_t type);
|
||||
|
||||
int opal_dss_print_size(char **output, char *prefix, size_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_pid(char **output, char *prefix, pid_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_bool(char **output, char *prefix, bool *src, opal_data_type_t type);
|
||||
int opal_dss_print_int(char **output, char *prefix, int *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint(char **output, char *prefix, int *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint8(char **output, char *prefix, uint8_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint16(char **output, char *prefix, uint16_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint32(char **output, char *prefix, uint32_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_int8(char **output, char *prefix, int8_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_int16(char **output, char *prefix, int16_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_int32(char **output, char *prefix, int32_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_size(char **output, char *prefix, size_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_pid(char **output, char *prefix, pid_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_bool(char **output, char *prefix, bool *src, opal_data_type_t type);
|
||||
int opal_dss_print_int(char **output, char *prefix, int *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint(char **output, char *prefix, int *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint8(char **output, char *prefix, uint8_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint16(char **output, char *prefix, uint16_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint32(char **output, char *prefix, uint32_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_int8(char **output, char *prefix, int8_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_int16(char **output, char *prefix, int16_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_int32(char **output, char *prefix, int32_t *src, opal_data_type_t type);
|
||||
#ifdef HAVE_INT64_T
|
||||
int opal_dss_print_uint64(char **output, char *prefix, uint64_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_int64(char **output, char *prefix, int64_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint64(char **output, char *prefix, uint64_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_int64(char **output, char *prefix, int64_t *src, opal_data_type_t type);
|
||||
#else
|
||||
int opal_dss_print_uint64(char **output, char *prefix, void *src, opal_data_type_t type);
|
||||
int opal_dss_print_int64(char **output, char *prefix, void *src, opal_data_type_t type);
|
||||
int opal_dss_print_uint64(char **output, char *prefix, void *src, opal_data_type_t type);
|
||||
int opal_dss_print_int64(char **output, char *prefix, void *src, opal_data_type_t type);
|
||||
#endif
|
||||
int opal_dss_print_null(char **output, char *prefix, void *src, opal_data_type_t type);
|
||||
int opal_dss_print_data_type(char **output, char *prefix, opal_data_type_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_data_value(char **output, char *prefix, opal_dss_value_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_byte_object(char **output, char *prefix, opal_byte_object_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_pstat(char **output, char *prefix, opal_pstats_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_node_stat(char **output, char *prefix, opal_node_stats_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_null(char **output, char *prefix, void *src, opal_data_type_t type);
|
||||
int opal_dss_print_data_type(char **output, char *prefix, opal_data_type_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_byte_object(char **output, char *prefix, opal_byte_object_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_pstat(char **output, char *prefix, opal_pstats_t *src, opal_data_type_t type);
|
||||
int opal_dss_print_node_stat(char **output, char *prefix, opal_node_stats_t *src, opal_data_type_t type);
|
||||
|
||||
|
||||
/*
|
||||
* Internal release functions
|
||||
*/
|
||||
void opal_dss_std_release(opal_dss_value_t *value);
|
||||
/*
|
||||
* Internal helper functions
|
||||
*/
|
||||
|
||||
void opal_dss_std_obj_release(opal_dss_value_t *value);
|
||||
char* opal_dss_buffer_extend(opal_buffer_t *bptr, size_t bytes_to_add);
|
||||
|
||||
void opal_dss_release_byte_object(opal_dss_value_t *value);
|
||||
bool opal_dss_too_small(opal_buffer_t *buffer, size_t bytes_reqd);
|
||||
|
||||
/*
|
||||
* Internal helper functions
|
||||
*/
|
||||
opal_dss_type_info_t* opal_dss_find_type(opal_data_type_t type);
|
||||
|
||||
char* opal_dss_buffer_extend(opal_buffer_t *bptr, size_t bytes_to_add);
|
||||
int opal_dss_store_data_type(opal_buffer_t *buffer, opal_data_type_t type);
|
||||
|
||||
bool opal_dss_too_small(opal_buffer_t *buffer, size_t bytes_reqd);
|
||||
|
||||
opal_dss_type_info_t* opal_dss_find_type(opal_data_type_t type);
|
||||
|
||||
int opal_dss_store_data_type(opal_buffer_t *buffer, opal_data_type_t type);
|
||||
|
||||
int opal_dss_get_data_type(opal_buffer_t *buffer, opal_data_type_t *type);
|
||||
int opal_dss_get_data_type(opal_buffer_t *buffer, opal_data_type_t *type);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -37,16 +38,13 @@ opal_data_type_t opal_dss_num_reg_types;
|
||||
opal_dss_buffer_type_t default_buf_type;
|
||||
|
||||
opal_dss_t opal_dss = {
|
||||
opal_dss_set,
|
||||
opal_dss_get,
|
||||
opal_dss_set_buffer_type,
|
||||
opal_dss_pack,
|
||||
opal_dss_unpack,
|
||||
opal_dss_copy,
|
||||
opal_dss_compare,
|
||||
opal_dss_size,
|
||||
opal_dss_print,
|
||||
opal_dss_release,
|
||||
opal_dss_structured,
|
||||
opal_dss_peek,
|
||||
opal_dss_unload,
|
||||
opal_dss_load,
|
||||
@ -60,27 +58,22 @@ opal_dss_t opal_dss = {
|
||||
/**
|
||||
* Object constructors, destructors, and instantiations
|
||||
*/
|
||||
/** Data Value **/
|
||||
/* constructor - used to initialize state of data value instance */
|
||||
static void opal_data_value_construct(opal_dss_value_t* ptr)
|
||||
/** Value **/
|
||||
static void opal_value_construct(opal_value_t* ptr)
|
||||
{
|
||||
ptr->key = NULL;
|
||||
ptr->type = OPAL_UNDEF;
|
||||
ptr->data = NULL;
|
||||
}
|
||||
/* destructor - used to release data value instance */
|
||||
static void opal_data_value_destruct(opal_dss_value_t* ptr)
|
||||
static void opal_value_destruct(opal_value_t* ptr)
|
||||
{
|
||||
if (NULL != ptr->data) {
|
||||
opal_dss.release(ptr);
|
||||
if (NULL != ptr->key) {
|
||||
free(ptr->key);
|
||||
}
|
||||
}
|
||||
|
||||
/* define instance of opal_class_t */
|
||||
OBJ_CLASS_INSTANCE(
|
||||
opal_dss_value_t, /* type name */
|
||||
opal_object_t, /* parent "class" name */
|
||||
opal_data_value_construct, /* constructor */
|
||||
opal_data_value_destruct); /* destructor */
|
||||
OBJ_CLASS_INSTANCE(opal_value_t,
|
||||
opal_list_item_t,
|
||||
opal_value_construct,
|
||||
opal_value_destruct);
|
||||
|
||||
|
||||
static void opal_buffer_construct (opal_buffer_t* buffer)
|
||||
@ -116,7 +109,6 @@ static void opal_dss_type_info_construct(opal_dss_type_info_t *obj)
|
||||
obj->odti_compare_fn = NULL;
|
||||
obj->odti_size_fn = NULL;
|
||||
obj->odti_print_fn = NULL;
|
||||
obj->odti_release_fn = NULL;
|
||||
obj->odti_structured = false;
|
||||
}
|
||||
|
||||
@ -239,7 +231,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_null,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_null,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_NULL", &tmp))) {
|
||||
return rc;
|
||||
@ -251,7 +242,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_byte,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_byte,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_BYTE", &tmp))) {
|
||||
return rc;
|
||||
@ -263,7 +253,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_bool,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_bool,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_BOOL", &tmp))) {
|
||||
return rc;
|
||||
@ -275,7 +264,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_int,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_int,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_INT", &tmp))) {
|
||||
return rc;
|
||||
@ -287,7 +275,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_uint,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_uint,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_UINT", &tmp))) {
|
||||
return rc;
|
||||
@ -299,7 +286,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_int8,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_int8,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_INT8", &tmp))) {
|
||||
return rc;
|
||||
@ -311,7 +297,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_uint8,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_uint8,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_UINT8", &tmp))) {
|
||||
return rc;
|
||||
@ -323,7 +308,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_int16,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_int16,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_INT16", &tmp))) {
|
||||
return rc;
|
||||
@ -335,7 +319,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_uint16,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_uint16,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_UINT16", &tmp))) {
|
||||
return rc;
|
||||
@ -347,7 +330,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_int32,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_int32,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_INT32", &tmp))) {
|
||||
return rc;
|
||||
@ -359,7 +341,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_uint32,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_uint32,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_UINT32", &tmp))) {
|
||||
return rc;
|
||||
@ -371,7 +352,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_int64,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_int64,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_INT64", &tmp))) {
|
||||
return rc;
|
||||
@ -383,7 +363,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_uint64,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_uint64,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_UINT64", &tmp))) {
|
||||
return rc;
|
||||
@ -395,7 +374,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_size,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_size,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_SIZE", &tmp))) {
|
||||
return rc;
|
||||
@ -407,7 +385,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_pid,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_pid,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_PID", &tmp))) {
|
||||
return rc;
|
||||
@ -419,7 +396,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_string,
|
||||
(opal_dss_size_fn_t)opal_dss_size_string,
|
||||
(opal_dss_print_fn_t)opal_dss_print_string,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"OPAL_STRING", &tmp))) {
|
||||
return rc;
|
||||
@ -431,23 +407,10 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_dt,
|
||||
(opal_dss_size_fn_t)opal_dss_std_size,
|
||||
(opal_dss_print_fn_t)opal_dss_print_data_type,
|
||||
(opal_dss_release_fn_t)opal_dss_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"OPAL_DATA_TYPE", &tmp))) {
|
||||
return rc;
|
||||
}
|
||||
tmp = OPAL_DATA_VALUE;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.register_type(opal_dss_pack_data_value,
|
||||
opal_dss_unpack_data_value,
|
||||
(opal_dss_copy_fn_t)opal_dss_copy_data_value,
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_data_value,
|
||||
(opal_dss_size_fn_t)opal_dss_size_data_value,
|
||||
(opal_dss_print_fn_t)opal_dss_print_data_value,
|
||||
(opal_dss_release_fn_t)opal_dss_std_obj_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"OPAL_DATA_VALUE", &tmp))) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
tmp = OPAL_BYTE_OBJECT;
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.register_type(opal_dss_pack_byte_object,
|
||||
@ -456,7 +419,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_byte_object,
|
||||
(opal_dss_size_fn_t)opal_dss_size_byte_object,
|
||||
(opal_dss_print_fn_t)opal_dss_print_byte_object,
|
||||
(opal_dss_release_fn_t)opal_dss_release_byte_object,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"OPAL_BYTE_OBJECT", &tmp))) {
|
||||
return rc;
|
||||
@ -469,7 +431,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_pstat,
|
||||
(opal_dss_size_fn_t)opal_dss_size_pstat,
|
||||
(opal_dss_print_fn_t)opal_dss_print_pstat,
|
||||
(opal_dss_release_fn_t)opal_dss_std_obj_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"OPAL_PSTAT", &tmp))) {
|
||||
return rc;
|
||||
@ -482,7 +443,6 @@ int opal_dss_open(void)
|
||||
(opal_dss_compare_fn_t)opal_dss_compare_node_stat,
|
||||
(opal_dss_size_fn_t)opal_dss_size_node_stat,
|
||||
(opal_dss_print_fn_t)opal_dss_print_node_stat,
|
||||
(opal_dss_release_fn_t)opal_dss_std_obj_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"OPAL_NODE_STAT", &tmp))) {
|
||||
return rc;
|
||||
@ -515,3 +475,19 @@ int opal_dss_close(void)
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
bool opal_dss_structured(opal_data_type_t type)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* find the type */
|
||||
for (i = 0 ; i < opal_dss_types.size ; ++i) {
|
||||
opal_dss_type_info_t *info = (opal_dss_type_info_t*)opal_pointer_array_get_item(&opal_dss_types, i);
|
||||
if (NULL != info && info->odti_type == type) {
|
||||
return info->odti_structured;
|
||||
}
|
||||
}
|
||||
|
||||
/* default to false */
|
||||
return false;
|
||||
}
|
||||
|
@ -341,57 +341,6 @@ int opal_dss_pack_data_type(opal_buffer_t *buffer, const void *src, int32_t num_
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* OPAL_DATA_VALUE
|
||||
*/
|
||||
int opal_dss_pack_data_value(opal_buffer_t *buffer, const void *src, int32_t num, opal_data_type_t type)
|
||||
{
|
||||
opal_dss_type_info_t *info;
|
||||
opal_dss_value_t **sdv;
|
||||
int32_t i;
|
||||
int ret;
|
||||
|
||||
sdv = (opal_dss_value_t **) src;
|
||||
|
||||
for (i = 0; i < num; ++i) {
|
||||
/* if the src data value is NULL, then we will pack it as OPAL_NULL to indicate
|
||||
* that the unpack should leave a NULL data value
|
||||
*/
|
||||
if (NULL == sdv[i]) {
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_store_data_type(buffer, OPAL_NULL))) {
|
||||
return ret;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
/* pack the data type - we'll need it on the other end */
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_store_data_type(buffer, sdv[i]->type))) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* if the data type is UNDEF, then nothing more to do */
|
||||
if (OPAL_UNDEF == sdv[i]->type) continue;
|
||||
|
||||
/* Lookup the pack function for this type and call it */
|
||||
|
||||
if (NULL == (info = (opal_dss_type_info_t*)opal_pointer_array_get_item(&opal_dss_types, sdv[i]->type))) {
|
||||
return OPAL_ERR_PACK_FAILURE;
|
||||
}
|
||||
|
||||
if (info->odti_structured) {
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_pack_buffer(buffer, &(sdv[i]->data), 1, sdv[i]->type))) {
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_pack_buffer(buffer, sdv[i]->data, 1, sdv[i]->type))) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* OPAL_BYTE_OBJECT
|
||||
*/
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -391,54 +392,6 @@ int opal_dss_print_data_type(char **output, char *prefix, opal_data_type_t *src,
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* OPAL_DATA_VALUE
|
||||
*/
|
||||
int opal_dss_print_data_value(char **output, char *prefix, opal_dss_value_t *src, opal_data_type_t type)
|
||||
{
|
||||
char *pfx, *tmp1, *tmp2;
|
||||
int rc;
|
||||
|
||||
/* if src is NULL, just print data type and return */
|
||||
if (NULL == src) {
|
||||
if (NULL != prefix) {
|
||||
asprintf(output, "%sData type: OPAL_DATA_VALUE\tValue: NULL pointer", prefix);
|
||||
} else {
|
||||
asprintf(output, "Data type: OPAL_DATA_VALUE\tValue: NULL pointer");
|
||||
}
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
if (NULL != prefix) {
|
||||
asprintf(&pfx, "%s\t", prefix);
|
||||
asprintf(&tmp1, "%sData type: OPAL_DATA_VALUE:\n", prefix);
|
||||
} else {
|
||||
asprintf(&tmp1, "Data type: OPAL_DATA_VALUE:\n");
|
||||
asprintf(&pfx, "\t");
|
||||
}
|
||||
|
||||
/* if data is included, print it */
|
||||
if (OPAL_UNDEF == src->type) { /* undefined data type - just report it */
|
||||
asprintf(&tmp2, "%sData type: OPAL_UNDEF\tValue: N/A", pfx);
|
||||
} else if (NULL != src->data) {
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.print(&tmp2, pfx, src->data, src->type))) {
|
||||
if (NULL != tmp1) free(tmp1);
|
||||
if (NULL != pfx) free(pfx);
|
||||
*output = NULL;
|
||||
return rc;
|
||||
}
|
||||
} else { /* indicate the data field was NULL */
|
||||
asprintf(&tmp2, "%sData field is NULL", pfx);
|
||||
}
|
||||
|
||||
asprintf(output, "%s%s", tmp1, tmp2);
|
||||
free(tmp1);
|
||||
free(tmp2);
|
||||
if (NULL != pfx) free(pfx);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* OPAL_BYTE_OBJECT
|
||||
*/
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -26,7 +27,6 @@ int opal_dss_register(opal_dss_pack_fn_t pack_fn,
|
||||
opal_dss_compare_fn_t compare_fn,
|
||||
opal_dss_size_fn_t size_fn,
|
||||
opal_dss_print_fn_t print_fn,
|
||||
opal_dss_release_fn_t release_fn,
|
||||
bool structured,
|
||||
const char *name, opal_data_type_t *type)
|
||||
{
|
||||
@ -75,7 +75,6 @@ int opal_dss_register(opal_dss_pack_fn_t pack_fn,
|
||||
info->odti_compare_fn = compare_fn;
|
||||
info->odti_size_fn = size_fn;
|
||||
info->odti_print_fn = print_fn;
|
||||
info->odti_release_fn = release_fn;
|
||||
info->odti_structured = structured;
|
||||
|
||||
return opal_pointer_array_set_item(&opal_dss_types, *type, info);
|
||||
|
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2006 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "opal_config.h"
|
||||
|
||||
#include "opal/dss/dss_internal.h"
|
||||
|
||||
void opal_dss_release(opal_dss_value_t *value)
|
||||
{
|
||||
opal_dss_type_info_t *info = NULL;
|
||||
|
||||
/* check for error */
|
||||
if (NULL == value) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Lookup the release function for this type and call it */
|
||||
|
||||
if (NULL == (info = (opal_dss_type_info_t*)opal_pointer_array_get_item(&opal_dss_types, value->type))) {
|
||||
return;
|
||||
}
|
||||
|
||||
info->odti_release_fn(value);
|
||||
}
|
||||
|
||||
/*
|
||||
* STANDARD RELEASE FUNCTION - WORKS FOR EVERYTHING NON-STRUCTURED
|
||||
*/
|
||||
void opal_dss_std_release(opal_dss_value_t *value)
|
||||
{
|
||||
free(value->data);
|
||||
value->data = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* STANDARD OBJECT RELEASE FUNCTION - WORKS FOR EVERYTHING
|
||||
*/
|
||||
void opal_dss_std_obj_release(opal_dss_value_t *value)
|
||||
{
|
||||
OBJ_RELEASE(value->data);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* OPAL_BYTE_OBJECT
|
||||
*/
|
||||
void opal_dss_release_byte_object(opal_dss_value_t *value)
|
||||
{
|
||||
opal_byte_object_t *bo;
|
||||
|
||||
bo = (opal_byte_object_t*)value->data;
|
||||
free(bo->bytes);
|
||||
|
||||
free(value->data);
|
||||
value->data = NULL;
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "opal_config.h"
|
||||
|
||||
#include "opal/dss/dss_internal.h"
|
||||
|
||||
int opal_dss_set(opal_dss_value_t *value, void *new_value, opal_data_type_t type)
|
||||
{
|
||||
/* check for error */
|
||||
if (NULL == value || NULL == new_value) {
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
/* see if a value is already loaded - if so, that's just wrong. We can't
|
||||
release it ourselves because we don't know for certain that the data
|
||||
was stored dynamically
|
||||
*/
|
||||
if (NULL != value->data) {
|
||||
return OPAL_ERR_DATA_OVERWRITE_ATTEMPT;
|
||||
}
|
||||
|
||||
/* set the type */
|
||||
value->type = type;
|
||||
|
||||
/* point the value to the data object */
|
||||
value->data = new_value;
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "opal_config.h"
|
||||
|
||||
#include "opal/dss/dss_internal.h"
|
||||
|
||||
int opal_dss_set_buffer_type(opal_buffer_t *buffer, opal_dss_buffer_type_t type)
|
||||
{
|
||||
/** check for error */
|
||||
if (NULL == buffer) {
|
||||
return OPAL_ERR_BAD_PARAM;
|
||||
}
|
||||
|
||||
/** see if the buffer is empty - if not, generate error */
|
||||
if (buffer->base_ptr != buffer->pack_ptr) {
|
||||
return OPAL_ERR_BUFFER;
|
||||
}
|
||||
|
||||
/** set the type */
|
||||
buffer->type = type;
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -114,29 +115,6 @@ int opal_dss_size_string(size_t *size, char *src, opal_data_type_t type)
|
||||
|
||||
/* SIZE FUNCTIONS FOR GENERIC OPAL TYPES */
|
||||
|
||||
/*
|
||||
* OPAL_DATA_VALUE
|
||||
*/
|
||||
int opal_dss_size_data_value(size_t *size, opal_dss_value_t *src, opal_data_type_t type)
|
||||
{
|
||||
size_t data_size;
|
||||
int rc;
|
||||
|
||||
/* account for size of object itself... */
|
||||
*size = sizeof(opal_dss_value_t);
|
||||
|
||||
if (NULL != src) {
|
||||
/* ...and the number of bytes in the payload, IF an actual object was provided */
|
||||
if (OPAL_SUCCESS != (rc = opal_dss.size(&data_size, src->data, src->type))) {
|
||||
return rc;
|
||||
}
|
||||
*size += data_size;
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* OPAL_BYTE_OBJECT
|
||||
*/
|
||||
|
@ -73,10 +73,9 @@ typedef struct {
|
||||
#define OPAL_BYTE_OBJECT (opal_data_type_t) 16 /**< byte object structure */
|
||||
#define OPAL_DATA_TYPE (opal_data_type_t) 17 /**< data type */
|
||||
#define OPAL_NULL (opal_data_type_t) 18 /**< don't interpret data type */
|
||||
#define OPAL_DATA_VALUE (opal_data_type_t) 19 /**< data value */
|
||||
#define OPAL_PSTAT (opal_data_type_t) 20 /**< process statistics */
|
||||
#define OPAL_NODE_STAT (opal_data_type_t) 21 /**< node statistics */
|
||||
#define OPAL_HWLOC_TOPO (opal_data_type_t) 22 /**< hwloc topology */
|
||||
#define OPAL_PSTAT (opal_data_type_t) 19 /**< process statistics */
|
||||
#define OPAL_NODE_STAT (opal_data_type_t) 20 /**< node statistics */
|
||||
#define OPAL_HWLOC_TOPO (opal_data_type_t) 21 /**< hwloc topology */
|
||||
|
||||
#define OPAL_DSS_ID_DYNAMIC (opal_data_type_t) 30
|
||||
|
||||
@ -87,13 +86,28 @@ typedef struct {
|
||||
|
||||
/* Data value object */
|
||||
typedef struct {
|
||||
opal_object_t super; /* required for this to be an object */
|
||||
opal_list_item_t super; /* required for this to be on lists */
|
||||
char *key; /* key string */
|
||||
opal_data_type_t type; /* the type of value stored */
|
||||
void *data;
|
||||
} opal_dss_value_t;
|
||||
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_dss_value_t);
|
||||
|
||||
#define OPAL_DATA_VALUE_EMPTY { OPAL_OBJ_STATIC_INIT(opal_dss_value_t), OPAL_UNDEF, NULL}
|
||||
union {
|
||||
uint8_t byte;
|
||||
char *string;
|
||||
size_t size;
|
||||
pid_t pid;
|
||||
int integer;
|
||||
int8_t int8;
|
||||
int16_t int16;
|
||||
int32_t int32;
|
||||
int64_t int64;
|
||||
unsigned int uint;
|
||||
uint8_t uint8;
|
||||
uint16_t uint16;
|
||||
uint32_t uint32;
|
||||
uint64_t uint64;
|
||||
opal_byte_object_t bo;
|
||||
} data;
|
||||
} opal_value_t;
|
||||
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_value_t);
|
||||
|
||||
/* Process statistics object */
|
||||
#define OPAL_PSTAT_MAX_STRING_LEN 32
|
||||
@ -153,36 +167,36 @@ typedef uint8_t opal_dss_buffer_type_t;
|
||||
#define OPAL_DSS_BUFFER_TYPE_NTOH(h);
|
||||
|
||||
/**
|
||||
* Structure for holding a buffer to be used with the RML or OOB
|
||||
* subsystems.
|
||||
*/
|
||||
struct opal_buffer_t {
|
||||
/** First member must be the object's parent */
|
||||
opal_object_t parent;
|
||||
/** type of buffer */
|
||||
opal_dss_buffer_type_t type;
|
||||
/** Start of my memory */
|
||||
char *base_ptr;
|
||||
/** Where the next data will be packed to (within the allocated
|
||||
memory starting at base_ptr) */
|
||||
char *pack_ptr;
|
||||
/** Where the next data will be unpacked from (within the
|
||||
allocated memory starting as base_ptr) */
|
||||
char *unpack_ptr;
|
||||
* Structure for holding a buffer to be used with the RML or OOB
|
||||
* subsystems.
|
||||
*/
|
||||
struct opal_buffer_t {
|
||||
/** First member must be the object's parent */
|
||||
opal_object_t parent;
|
||||
/** type of buffer */
|
||||
opal_dss_buffer_type_t type;
|
||||
/** Start of my memory */
|
||||
char *base_ptr;
|
||||
/** Where the next data will be packed to (within the allocated
|
||||
memory starting at base_ptr) */
|
||||
char *pack_ptr;
|
||||
/** Where the next data will be unpacked from (within the
|
||||
allocated memory starting as base_ptr) */
|
||||
char *unpack_ptr;
|
||||
|
||||
/** Number of bytes allocated (starting at base_ptr) */
|
||||
size_t bytes_allocated;
|
||||
/** Number of bytes used by the buffer (i.e., amount of data --
|
||||
including overhead -- packed in the buffer) */
|
||||
size_t bytes_used;
|
||||
};
|
||||
/**
|
||||
* Convenience typedef
|
||||
*/
|
||||
typedef struct opal_buffer_t opal_buffer_t;
|
||||
|
||||
/** Number of bytes allocated (starting at base_ptr) */
|
||||
size_t bytes_allocated;
|
||||
/** Number of bytes used by the buffer (i.e., amount of data --
|
||||
including overhead -- packed in the buffer) */
|
||||
size_t bytes_used;
|
||||
};
|
||||
/**
|
||||
* Convenience typedef
|
||||
*/
|
||||
typedef struct opal_buffer_t opal_buffer_t;
|
||||
|
||||
/** formalize the declaration */
|
||||
OPAL_DECLSPEC OBJ_CLASS_DECLARATION (opal_buffer_t);
|
||||
/** formalize the declaration */
|
||||
OPAL_DECLSPEC OBJ_CLASS_DECLARATION (opal_buffer_t);
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
|
@ -9,6 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2012 Los Alamos National Security, Inc. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -406,74 +407,6 @@ int opal_dss_unpack_data_type(opal_buffer_t *buffer, void *dest, int32_t *num_va
|
||||
return opal_dss_unpack_buffer(buffer, dest, num_vals, OPAL_DATA_TYPE_T);
|
||||
}
|
||||
|
||||
/*
|
||||
* OPAL_DATA_VALUE
|
||||
*/
|
||||
int opal_dss_unpack_data_value(opal_buffer_t *buffer, void *dest, int32_t *num,
|
||||
opal_data_type_t type)
|
||||
{
|
||||
opal_dss_type_info_t *info;
|
||||
opal_dss_value_t **ddv;
|
||||
int32_t i, n;
|
||||
opal_data_type_t dt;
|
||||
size_t nsize;
|
||||
int ret;
|
||||
|
||||
ddv = (opal_dss_value_t **) dest;
|
||||
|
||||
for (i = 0; i < *num; ++i) {
|
||||
/* see what the data type is */
|
||||
n = 1;
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_get_data_type(buffer, &dt))) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* if it is OPAL_NULL, then do nothing */
|
||||
if (OPAL_NULL == dt) continue;
|
||||
|
||||
/* otherwise, allocate the new object and set the type */
|
||||
|
||||
ddv[i] = OBJ_NEW(opal_dss_value_t);
|
||||
if (NULL == ddv[i]) {
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
ddv[i]->type = dt;
|
||||
|
||||
/* if it is UNDEF, then nothing more to do */
|
||||
if (OPAL_UNDEF == ddv[i]->type) continue;
|
||||
|
||||
/* get enough memory to hold it */
|
||||
if (OPAL_SUCCESS != (ret = opal_dss.size(&nsize, NULL, ddv[i]->type))) {
|
||||
return ret;
|
||||
}
|
||||
ddv[i]->data = (void*)malloc(nsize);
|
||||
if (NULL == ddv[i]->data) {
|
||||
return OPAL_ERR_OUT_OF_RESOURCE;
|
||||
}
|
||||
|
||||
/* Lookup the unpack function for this type and call it */
|
||||
|
||||
if (NULL == (info = (opal_dss_type_info_t*)opal_pointer_array_get_item(&opal_dss_types, ddv[i]->type))) {
|
||||
return OPAL_ERR_PACK_FAILURE;
|
||||
}
|
||||
|
||||
if (info->odti_structured) {
|
||||
n=1;
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_unpack_buffer(buffer, &(ddv[i]->data), &n, ddv[i]->type))) {
|
||||
return ret;
|
||||
}
|
||||
} else {
|
||||
n=1;
|
||||
if (OPAL_SUCCESS != (ret = opal_dss_unpack_buffer(buffer, ddv[i]->data, &n, ddv[i]->type))) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* OPAL_BYTE_OBJECT
|
||||
*/
|
||||
|
@ -229,7 +229,6 @@ OPAL_DECLSPEC int opal_hwloc_print(char **output, char *prefix,
|
||||
OPAL_DECLSPEC int opal_hwloc_size(size_t *size,
|
||||
hwloc_topology_t src,
|
||||
opal_data_type_t type);
|
||||
OPAL_DECLSPEC void opal_hwloc_release(opal_dss_value_t *value);
|
||||
|
||||
/**
|
||||
* Make a prettyprint string for a hwloc_cpuset_t (e.g., "socket
|
||||
|
@ -341,6 +341,3 @@ int opal_hwloc_size(size_t *size, hwloc_topology_t src, opal_data_type_t type)
|
||||
return OPAL_ERR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
void opal_hwloc_release(opal_dss_value_t *value)
|
||||
{
|
||||
}
|
||||
|
@ -292,7 +292,6 @@ int opal_hwloc_base_open(void)
|
||||
(opal_dss_compare_fn_t)opal_hwloc_compare,
|
||||
(opal_dss_size_fn_t)opal_hwloc_size,
|
||||
(opal_dss_print_fn_t)opal_hwloc_print,
|
||||
(opal_dss_release_fn_t)opal_hwloc_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"OPAL_HWLOC_TOPO", &tmp))) {
|
||||
return value;
|
||||
|
@ -11,6 +11,8 @@
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2012 Los Alamos National Security, LLC.
|
||||
# All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
@ -39,7 +41,6 @@ libopen_rte_la_SOURCES += \
|
||||
runtime/data_type_support/orte_dt_compare_fns.c \
|
||||
runtime/data_type_support/orte_dt_copy_fns.c \
|
||||
runtime/data_type_support/orte_dt_print_fns.c \
|
||||
runtime/data_type_support/orte_dt_release_fns.c \
|
||||
runtime/data_type_support/orte_dt_size_fns.c \
|
||||
runtime/data_type_support/orte_dt_packing_fns.c \
|
||||
runtime/data_type_support/orte_dt_unpacking_fns.c \
|
||||
|
@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
* 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$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "orte_config.h"
|
||||
#include "opal/dss/dss.h"
|
||||
#include "orte/runtime/data_type_support/orte_dt_support.h"
|
||||
|
||||
/*
|
||||
* STANDARD OBJECT RELEASE
|
||||
*/
|
||||
void orte_dt_std_obj_release(opal_dss_value_t *value)
|
||||
{
|
||||
OBJ_RELEASE(value->data);
|
||||
}
|
||||
|
||||
/*
|
||||
* STANDARD RELEASE FUNCTION - WORKS FOR EVERYTHING NON-STRUCTURED
|
||||
*/
|
||||
void orte_dt_std_release(opal_dss_value_t *value)
|
||||
{
|
||||
if (NULL == value) return;
|
||||
|
||||
free(value->data);
|
||||
value->data = NULL;
|
||||
}
|
@ -9,7 +9,7 @@
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2011 Los Alamos National Security, LLC.
|
||||
* Copyright (c) 2011-2012 Los Alamos National Security, LLC.
|
||||
* All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -154,10 +154,6 @@ int orte_dt_print_app_context(char **output, char *prefix, orte_app_context_t *s
|
||||
int orte_dt_print_map(char **output, char *prefix, orte_job_map_t *src, opal_data_type_t type);
|
||||
#endif
|
||||
|
||||
/** Data type release functions */
|
||||
void orte_dt_std_obj_release(opal_dss_value_t *value);
|
||||
void orte_dt_std_release(opal_dss_value_t *value);
|
||||
|
||||
/** Data type size functions */
|
||||
int orte_dt_std_size(size_t *size, void *src, opal_data_type_t type);
|
||||
#if !ORTE_DISABLE_FULL_SUPPORT
|
||||
|
@ -239,7 +239,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_std_cntr,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_STD_CNTR", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -252,7 +251,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_name,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_print_name,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_NAME", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -266,7 +264,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_vpid,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_VPID", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -280,7 +277,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_jobid,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_JOBID", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -295,7 +291,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_job,
|
||||
(opal_dss_size_fn_t)orte_dt_size_job,
|
||||
(opal_dss_print_fn_t)orte_dt_print_job,
|
||||
(opal_dss_release_fn_t)orte_dt_std_obj_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"ORTE_JOB", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -309,7 +304,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_node,
|
||||
(opal_dss_size_fn_t)orte_dt_size_node,
|
||||
(opal_dss_print_fn_t)orte_dt_print_node,
|
||||
(opal_dss_release_fn_t)orte_dt_std_obj_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"ORTE_NODE", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -323,7 +317,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_proc,
|
||||
(opal_dss_size_fn_t)orte_dt_size_proc,
|
||||
(opal_dss_print_fn_t)orte_dt_print_proc,
|
||||
(opal_dss_release_fn_t)orte_dt_std_obj_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"ORTE_PROC", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -337,7 +330,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_app_context,
|
||||
(opal_dss_size_fn_t)orte_dt_size_app_context,
|
||||
(opal_dss_print_fn_t)orte_dt_print_app_context,
|
||||
(opal_dss_release_fn_t)orte_dt_std_obj_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"ORTE_APP_CONTEXT", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -351,7 +343,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_node_state,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_NODE_STATE", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -365,7 +356,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_proc_state,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_PROC_STATE", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -379,7 +369,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_job_state,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_JOB_STATE", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -393,7 +382,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_exit_code,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_EXIT_CODE", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -407,7 +395,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_map,
|
||||
(opal_dss_size_fn_t)orte_dt_size_map,
|
||||
(opal_dss_print_fn_t)orte_dt_print_map,
|
||||
(opal_dss_release_fn_t)orte_dt_std_obj_release,
|
||||
OPAL_DSS_STRUCTURED,
|
||||
"ORTE_JOB_MAP", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -421,7 +408,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_tags,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_RML_TAG", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -435,7 +421,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_daemon_cmd,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_DAEMON_CMD", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
@ -449,7 +434,6 @@ int orte_dt_init(void)
|
||||
(opal_dss_compare_fn_t)orte_dt_compare_iof_tag,
|
||||
(opal_dss_size_fn_t)orte_dt_std_size,
|
||||
(opal_dss_print_fn_t)orte_dt_std_print,
|
||||
(opal_dss_release_fn_t)orte_dt_std_release,
|
||||
OPAL_DSS_UNSTRUCTURED,
|
||||
"ORTE_IOF_TAG", &tmp))) {
|
||||
ORTE_ERROR_LOG(rc);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user