debian man page for xdf_closest_type

Query: xdf_closest_type

OS: debian

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

XDF_CLOSEST_TYPE(3)					     xdffileio library manual					       XDF_CLOSEST_TYPE(3)

NAME
xdf_closest_type - Returns a compatible data type
SYNOPSIS
#include <xdfio.h> int xdf_closest_type(struct xdf* xdf, enum xdftype target);
DESCRIPTION
xdf_closest_type() selects among the data types supported by the file referenced by xdf the type that is the closest to the target argu- ment. The selected type can then be safely used in a call to xdf_set_chconf(3) with the XDF_CF_STOTYPE field. The selection algorithm is based on the 3 following criterions (cited by priority, i.e. most important cited first): data size, signed/unsigned type, float/integer value. The data size criterion forces the selected type to have a data size (number of byte to repre- sent the value) equal or bigger than the one of the target type (with a preference with sizes the closest to the size of target). The signed/unsigned criterion tries to select a type that has the same signeness (signed or unsigned data type) as the target. Finally the float/integer criterion tries to select a floating point type if target is float or double or an integer data type if target is an integer type. As a consequence, if target is supported by the underlying file format of xdf, the function is ensured to return target.
RETURN VALUE
xdf_closest_type() returns the selected data type in case of success, otherwise -1 and errno is set appropriately.
ERRORS
EINVAL the xdf pointer is NULL, or the argument type is not an admissible enum xdftype value.
SEE ALSO
xdf_set_chconf(3)
EPFL
2010 XDF_CLOSEST_TYPE(3)
Related Man Pages
xdf_add_channel(3) - debian
xdf_prepare_transfer(3) - debian
xdf_write(3) - debian
xdf_set_chconf(3) - debian
glclearbufferdata(3g) - centos
Similar Topics in the Unix Linux Community
appending
what is the base type of enum
mindway: v3.0 β test version released