Help us improve by taking our short survey: https://www.hdfgroup.org/website-survey/

| HDF5 Last Updated on 2026-07-28 The HDF5 Field Guide

Loading...
Searching...
No Matches
Native Datatypes
Datatypes (H5T) » Predefined Datatypes

## Detailed Description

These are the C-like datatypes for the platform. Their names differ from other HDF5 datatype names as follows:

- Instead of a class name, precision and byte order as the last component, they have a C-like type name.
- If the type begins with `U` then it is the unsigned version of the integer type; other integer types are signed.
- The datatype `LLONG` corresponds C's long long and `LDOUBLE` is long double. These types might be the same as `LONG` and `DOUBLE`, respectively.

Predefined Native Datatypes
Datatype | Description
--- | ---
H5T_NATIVE_CHAR | C-style char
H5T_NATIVE_SCHAR | C-style signed char
H5T_NATIVE_UCHAR | C-style unsigned signed char
H5T_NATIVE_SHORT | C-style short
H5T_NATIVE_USHORT | C-style unsigned short
H5T_NATIVE_INT | C-style int
H5T_NATIVE_UINT | C-style unsigned int
H5T_NATIVE_LONG | C-style long
H5T_NATIVE_ULONG | C-style unsigned long
H5T_NATIVE_LLONG | C-style long long
H5T_NATIVE_ULLONG | C-style unsigned long long
H5T_NATIVE_FLOAT16 | C-style _Float16 (May be H5I_INVALID_HID if platform doesn't support _Float16 type)
H5T_NATIVE_FLOAT | C-style float
H5T_NATIVE_DOUBLE | C-style double
H5T_NATIVE_LDOUBLE | C-style long double
H5T_NATIVE_FLOAT_COMPLEX | C-style float _Complex (MSVC _Fcomplex) (May be H5I_INVALID_HID if platform doesn't support float _Complex / _Fcomplex type)
H5T_NATIVE_DOUBLE_COMPLEX | C-style double _Complex (MSVC _Dcomplex) (May be H5I_INVALID_HID if platform doesn't support double _Complex / _Dcomplex type)
H5T_NATIVE_LDOUBLE_COMPLEX | C-style long double _Complex (MSVC _Lcomplex) (May be H5I_INVALID_HID if platform doesn't support long double _Complex / _Lcomplex type)
H5T_NATIVE_B8 | 8-bit bitfield based on native types
H5T_NATIVE_B16 | 16-bit bitfield based on native types
H5T_NATIVE_B32 | 32-bit bitfield based on native types
H5T_NATIVE_B64 | 64-bit bitfield based on native types
H5T_NATIVE_OPAQUE | opaque unit based on native types
H5T_NATIVE_HADDR | address type based on native types
H5T_NATIVE_HSIZE | size type based on native types
H5T_NATIVE_HSSIZE | signed size type based on native types
H5T_NATIVE_HERR | error code type based on native types
H5T_NATIVE_HBOOL | Boolean type based on native types

## Topics
| C9x Integer Datatypes

## Macros
#define | H5T_NATIVE_B16 (H5OPEN H5T_NATIVE_B16_g)
#define | H5T_NATIVE_B32 (H5OPEN H5T_NATIVE_B32_g)
#define | H5T_NATIVE_B64 (H5OPEN H5T_NATIVE_B64_g)
#define | H5T_NATIVE_B8 (H5OPEN H5T_NATIVE_B8_g)
#define | H5T_NATIVE_CHAR (CHAR_MIN ? H5T_NATIVE_SCHAR : H5T_NATIVE_UCHAR)
#define | H5T_NATIVE_DOUBLE (H5OPEN H5T_NATIVE_DOUBLE_g)
#define | H5T_NATIVE_DOUBLE_COMPLEX (H5OPEN H5T_NATIVE_DOUBLE_COMPLEX_g)
#define | H5T_NATIVE_FLOAT (H5OPEN H5T_NATIVE_FLOAT_g)
#define | H5T_NATIVE_FLOAT16 (H5OPEN H5T_NATIVE_FLOAT16_g)
#define | H5T_NATIVE_FLOAT_COMPLEX (H5OPEN H5T_NATIVE_FLOAT_COMPLEX_g)
#define | H5T_NATIVE_HADDR (H5OPEN H5T_NATIVE_HADDR_g)
#define | H5T_NATIVE_HBOOL (H5OPEN H5T_NATIVE_HBOOL_g)
#define | H5T_NATIVE_HERR (H5OPEN H5T_NATIVE_HERR_g)
#define | H5T_NATIVE_HSIZE (H5OPEN H5T_NATIVE_HSIZE_g)
#define | H5T_NATIVE_HSSIZE (H5OPEN H5T_NATIVE_HSSIZE_g)
#define | H5T_NATIVE_INT (H5OPEN H5T_NATIVE_INT_g)
#define | H5T_NATIVE_LDOUBLE (H5OPEN H5T_NATIVE_LDOUBLE_g)
#define | H5T_NATIVE_LDOUBLE_COMPLEX (H5OPEN H5T_NATIVE_LDOUBLE_COMPLEX_g)
#define | H5T_NATIVE_LLONG (H5OPEN H5T_NATIVE_LLONG_g)
#define | H5T_NATIVE_LONG (H5OPEN H5T_NATIVE_LONG_g)
#define | H5T_NATIVE_OPAQUE (H5OPEN H5T_NATIVE_OPAQUE_g)
#define | H5T_NATIVE_SCHAR (H5OPEN H5T_NATIVE_SCHAR_g)
#define | H5T_NATIVE_SHORT (H5OPEN H5T_NATIVE_SHORT_g)
#define | H5T_NATIVE_UCHAR (H5OPEN H5T_NATIVE_UCHAR_g)
#define | H5T_NATIVE_UINT (H5OPEN H5T_NATIVE_UINT_g)
#define | H5T_NATIVE_ULLONG (H5OPEN H5T_NATIVE_ULLONG_g)
#define | H5T_NATIVE_ULONG (H5OPEN H5T_NATIVE_ULONG_g)
#define | H5T_NATIVE_USHORT (H5OPEN H5T_NATIVE_USHORT_g)

## Macro Definition Documentation

## ◆ H5T_NATIVE_B16

#define H5T_NATIVE_B16 (H5OPEN H5T_NATIVE_B16_g)

HDF5 16-bit bitfield based on native types

Since
  1.0.0

## ◆ H5T_NATIVE_B32

#define H5T_NATIVE_B32 (H5OPEN H5T_NATIVE_B32_g)

HDF5 32-bit bitfield based on native types

Since
  1.0.0

## ◆ H5T_NATIVE_B64

#define H5T_NATIVE_B64 (H5OPEN H5T_NATIVE_B64_g)

HDF5 64-bit bitfield based on native types

Since
  1.0.0

## ◆ H5T_NATIVE_B8

#define H5T_NATIVE_B8 (H5OPEN H5T_NATIVE_B8_g)

HDF5 8-bit bitfield based on native types

Since
  1.0.0

## ◆ H5T_NATIVE_CHAR

#define H5T_NATIVE_CHAR (CHAR_MIN ? H5T_NATIVE_SCHAR : H5T_NATIVE_UCHAR)

C-style `char`

Since
  1.0.0

## ◆ H5T_NATIVE_DOUBLE

#define H5T_NATIVE_DOUBLE (H5OPEN H5T_NATIVE_DOUBLE_g)

C-style double

Since
  1.0.0

## ◆ H5T_NATIVE_DOUBLE_COMPLEX

#define H5T_NATIVE_DOUBLE_COMPLEX (H5OPEN H5T_NATIVE_DOUBLE_COMPLEX_g)

C-style double _Complex / (MSVC) _Dcomplex (May be H5I_INVALID_HID if platform doesn't support double _Complex/_Dcomplex type)

Since
  2.0.0

## ◆ H5T_NATIVE_FLOAT

#define H5T_NATIVE_FLOAT (H5OPEN H5T_NATIVE_FLOAT_g)

C-style float

Since
  1.0.0

## ◆ H5T_NATIVE_FLOAT16

#define H5T_NATIVE_FLOAT16 (H5OPEN H5T_NATIVE_FLOAT16_g)

C-style _Float16 (May be H5I_INVALID_HID if platform doesn't support _Float16 type)

Since
  1.14.4

## ◆ H5T_NATIVE_FLOAT_COMPLEX

#define H5T_NATIVE_FLOAT_COMPLEX (H5OPEN H5T_NATIVE_FLOAT_COMPLEX_g)

C-style float _Complex / (MSVC) _Fcomplex (May be H5I_INVALID_HID if platform doesn't support float _Complex/_Fcomplex type)

Since
  2.0.0

## ◆ H5T_NATIVE_HADDR

#define H5T_NATIVE_HADDR (H5OPEN H5T_NATIVE_HADDR_g)

HDF5 address type based on native types

Since
  1.4.0

## ◆ H5T_NATIVE_HBOOL

#define H5T_NATIVE_HBOOL (H5OPEN H5T_NATIVE_HBOOL_g)

HDF5 Boolean type based on native types

Since
  1.0.0

## ◆ H5T_NATIVE_HERR

#define H5T_NATIVE_HERR (H5OPEN H5T_NATIVE_HERR_g)

HDF5 error code type based on native types

Since
  1.0.0

## ◆ H5T_NATIVE_HSIZE

#define H5T_NATIVE_HSIZE (H5OPEN H5T_NATIVE_HSIZE_g)

HDF5 size type based on native types

Since
  1.0.0

## ◆ H5T_NATIVE_HSSIZE

#define H5T_NATIVE_HSSIZE (H5OPEN H5T_NATIVE_HSSIZE_g)

HDF5 signed size type based on native types

Since
  1.0.0

## ◆ H5T_NATIVE_INT

#define H5T_NATIVE_INT (H5OPEN H5T_NATIVE_INT_g)

C-style int

Since
  1.0.0

## ◆ H5T_NATIVE_LDOUBLE

#define H5T_NATIVE_LDOUBLE (H5OPEN H5T_NATIVE_LDOUBLE_g)

C-style long double

Since
  1.0.0

## ◆ H5T_NATIVE_LDOUBLE_COMPLEX

#define H5T_NATIVE_LDOUBLE_COMPLEX (H5OPEN H5T_NATIVE_LDOUBLE_COMPLEX_g)

C-style long double _Complex / (MSVC) _Lcomplex (May be H5I_INVALID_HID if platform doesn't support long double _Complex/_Lcomplex type)

Since
  2.0.0

## ◆ H5T_NATIVE_LLONG

#define H5T_NATIVE_LLONG (H5OPEN H5T_NATIVE_LLONG_g)

C-style long long

Since
  1.0.0

## ◆ H5T_NATIVE_LONG

#define H5T_NATIVE_LONG (H5OPEN H5T_NATIVE_LONG_g)

C-style long

Since
  1.0.0

## ◆ H5T_NATIVE_OPAQUE

#define H5T_NATIVE_OPAQUE (H5OPEN H5T_NATIVE_OPAQUE_g)

HDF5 opaque unit based on native types

Since
  1.0.0

## ◆ H5T_NATIVE_SCHAR

#define H5T_NATIVE_SCHAR (H5OPEN H5T_NATIVE_SCHAR_g)

C-style signed char

Since
  1.2.0

## ◆ H5T_NATIVE_SHORT

#define H5T_NATIVE_SHORT (H5OPEN H5T_NATIVE_SHORT_g)

C-style short

Since
  1.0.0

## ◆ H5T_NATIVE_UCHAR

#define H5T_NATIVE_UCHAR (H5OPEN H5T_NATIVE_UCHAR_g)

C-style unsigned char

Since
  1.0.0

## ◆ H5T_NATIVE_UINT

#define H5T_NATIVE_UINT (H5OPEN H5T_NATIVE_UINT_g)

C-style unsigned int

Since
  1.0.0

## ◆ H5T_NATIVE_ULLONG

#define H5T_NATIVE_ULLONG (H5OPEN H5T_NATIVE_ULLONG_g)

C-style unsigned long long

Since
  1.0.0

## ◆ H5T_NATIVE_ULONG

#define H5T_NATIVE_ULONG (H5OPEN H5T_NATIVE_ULONG_g)

C-style unsigned long

Since
  1.0.0

## ◆ H5T_NATIVE_USHORT

#define H5T_NATIVE_USHORT (H5OPEN H5T_NATIVE_USHORT_g)

C-style unsigned short

Since
  1.0.0