Public Member Functions

H5::FloatType Class Reference

List of all members.

Public Member Functions


Constructor & Destructor Documentation

H5::FloatType::FloatType ( const PredType pred_type  ) 

Creates a floating-point datatype using a predefined type.

Parameters:
pred_type - IN: Predefined datatype
Exceptions:
H5::DataTypeIException 

References H5::DataType::copy().

H5::FloatType::FloatType ( const DataSet dataset  ) 

Gets the floating-point datatype of the specified dataset.

Parameters:
dataset - IN: Dataset that this floating-point datatype associates with
Exceptions:
H5::DataTypeIException 

References H5::DataSet::getId().

H5::FloatType::FloatType ( const hid_t  existing_id  ) 

Creates an FloatType object using the id of an existing datatype.

Parameters:
existing_id - IN: Id of an existing datatype
Exceptions:
H5::DataTypeIException 

Member Function Documentation

size_t H5::FloatType::getEbias (  )  const

Retrieves the exponent bias of a floating-point type.

Returns:
Exponent bias
Exceptions:
H5::DataTypeIException 
void H5::FloatType::getFields ( size_t &  spos,
size_t &  epos,
size_t &  esize,
size_t &  mpos,
size_t &  msize 
) const

Retrieves floating point datatype bit field information.

Parameters:
spos - OUT: Retrieved floating-point sign bit
epos - OUT: Retrieved exponent bit-position
esize - OUT: Retrieved size of exponent, in bits
mpos - OUT: Retrieved mantissa bit-position
msize - OUT: Retrieved size of mantissa, in bits
Exceptions:
H5::DataTypeIException 
H5T_pad_t H5::FloatType::getInpad ( H5std_string &  pad_string  )  const

Retrieves the internal padding type for unused bits in this floating-point datatypes.

Returns:
Internal padding type, which can be:
  • H5T_PAD_ZERO (0) - Set background to zeros
  • H5T_PAD_ONE (1) - Set background to ones
  • H5T_PAD_BACKGROUND (2) - Leave background alone
Exceptions:
H5::DataTypeIException 
Description
For your convenience, this function also provides the text string of the returned internal padding type, via parameter pad_string.
H5T_norm_t H5::FloatType::getNorm ( H5std_string &  norm_string  )  const

Retrieves mantissa normalization of a floating-point datatype.

Parameters:
norm_string - OUT: Text string of the normalization type
Returns:
Valid normalization type, which can be:
  • H5T_NORM_IMPLIED (0) - MSB of mantissa is not stored
  • H5T_NORM_MSBSET (1) - MSB of mantissa is always 1
  • H5T_NORM_NONE (2) - Mantissa is not normalized
Exceptions:
H5::DataTypeIException 
Description
For your convenience, this function also provides the text string of the returned normalization type, via parameter norm_string.
void H5::FloatType::setEbias ( size_t  ebias  )  const

Sets the exponent bias of a floating-point type.

Parameters:
ebias - Exponent bias value
Exceptions:
H5::DataTypeIException 
void H5::FloatType::setFields ( size_t  spos,
size_t  epos,
size_t  esize,
size_t  mpos,
size_t  msize 
) const

Sets locations and sizes of floating point bit fields.

Parameters:
spos - OUT: Sign position, i.e., the bit offset of the floating-point sign bit.
epos - OUT: Exponent bit position
esize - OUT: Size of exponent, in bits
mpos - OUT: Mantissa bit-position
msize - OUT: Size of mantissa, in bits
Exceptions:
H5::DataTypeIException 
void H5::FloatType::setInpad ( H5T_pad_t  inpad  )  const

Fills unused internal floating point bits.

Parameters:
inpad - IN: Internal padding type
Exceptions:
H5::DataTypeIException 
Description
If any internal bits of a floating point type are unused (that is, those significant bits which are not part of the sign, exponent, or mantissa), then they will be filled according to the padding value provided by inpad.
Valid values for normalization type include:
  • H5T_PAD_ZERO (0) - Set background to zeros
  • H5T_PAD_ONE (1) - Set background to ones
  • H5T_PAD_BACKGROUND (2) - Leave background alone
void H5::FloatType::setNorm ( H5T_norm_t  norm  )  const

Sets the mantissa normalization of a floating-point datatype.

Parameters:
norm - IN: Mantissa normalization type
Exceptions:
H5::DataTypeIException 
Description
Valid values for normalization type include:
  • H5T_NORM_IMPLIED (0) - MSB of mantissa is not stored
  • H5T_NORM_MSBSET (1) - MSB of mantissa is always 1
  • H5T_NORM_NONE (2) - Mantissa is not normalized