Commit b880bd39 authored by gsell's avatar gsell
Browse files

C-API:

- use new H5hut type enumeration, not HDF5 types
parent cd2c9031
......@@ -49,7 +49,9 @@ H5BlockGetNumFieldAttribs (
H5_API_ENTER (h5_ssize_t,
"f=%p, field_name='%s'",
(h5_file_p)f, field_name);
H5_API_RETURN (h5b_get_num_field_attribs (f, field_name));
H5_API_RETURN (
h5b_get_num_field_attribs (
f, field_name));
}
/**
......@@ -187,13 +189,14 @@ H5Block3dSetFieldOrigin (
(h5_file_p)f, field_name,
x_origin, y_origin, z_origin);
h5_float64_t origin[3] = { x_origin, y_origin, z_origin };
H5_API_RETURN (h5b_write_field_attrib (
f,
field_name,
H5BLOCK_FIELD_ORIGIN_NAME,
(hid_t)H5_FLOAT64,
origin,
3));
H5_API_RETURN (
h5b_write_field_attrib (
f,
field_name,
H5BLOCK_FIELD_ORIGIN_NAME,
H5_FLOAT64_T,
origin,
3));
}
/**
......@@ -219,7 +222,7 @@ H5Block3dGetFieldOrigin (
f,
field_name,
H5BLOCK_FIELD_ORIGIN_NAME,
H5_FLOAT64,
H5_FLOAT64_T,
origin));
*x_origin = origin[0];
......@@ -249,13 +252,14 @@ H5Block3dSetFieldSpacing (
(h5_file_p)f, field_name,
x_spacing, y_spacing, z_spacing);
h5_float64_t spacing[3] = { x_spacing, y_spacing, z_spacing };
H5_API_RETURN (h5b_write_field_attrib (
f,
field_name,
H5BLOCK_FIELD_SPACING_NAME,
(hid_t)H5_FLOAT64,
spacing,
3));
H5_API_RETURN (
h5b_write_field_attrib (
f,
field_name,
H5BLOCK_FIELD_SPACING_NAME,
H5_FLOAT64_T,
spacing,
3));
}
/**
......@@ -281,7 +285,7 @@ H5Block3dGetFieldSpacing (
f,
field_name,
H5BLOCK_FIELD_SPACING_NAME,
H5_FLOAT64,
H5_FLOAT64_T,
spacing));
*x_spacing = spacing[0];
*y_spacing = spacing[1];
......@@ -341,9 +345,10 @@ H5Block3dSetFieldXCoords (
(h5_file_p)f,
field_name,
coords, (long long unsigned)n_coords);
H5_API_RETURN (h5b_set_3d_field_coords (
f, 0, field_name, H5BLOCK_FIELD_XCOORD_NAME,
coords, n_coords));
H5_API_RETURN (
h5b_set_3d_field_coords (
f, 0, field_name, H5BLOCK_FIELD_XCOORD_NAME,
coords, n_coords));
}
static inline h5_err_t
......@@ -360,11 +365,12 @@ H5Block3dSetFieldYCoords (
(h5_file_p)f,
field_name,
coords, (long long unsigned)n_coords);
H5_API_RETURN (h5b_set_3d_field_coords (
f, 1, field_name, H5BLOCK_FIELD_YCOORD_NAME,
coords, n_coords));
H5_API_RETURN (
h5b_set_3d_field_coords (
f, 1, field_name, H5BLOCK_FIELD_YCOORD_NAME,
coords, n_coords));
}
static inline h5_err_t
H5Block3dSetFieldZCoords (
const h5_file_t f,
......@@ -379,9 +385,10 @@ H5Block3dSetFieldZCoords (
(h5_file_p)f,
field_name,
coords, (long long unsigned)n_coords);
H5_API_RETURN (h5b_set_3d_field_coords (
f, 2, field_name, H5BLOCK_FIELD_ZCOORD_NAME,
coords, n_coords));
H5_API_RETURN (
h5b_set_3d_field_coords (
f, 2, field_name, H5BLOCK_FIELD_ZCOORD_NAME,
coords, n_coords));
}
/**
......@@ -436,9 +443,10 @@ H5Block3dGetFieldXCoords (
(h5_file_p)f,
field_name,
coords, (long long unsigned)n_coords);
H5_API_RETURN (h5b_get_3d_field_coords (
f, 0, field_name, H5BLOCK_FIELD_XCOORD_NAME,
coords, n_coords));
H5_API_RETURN (
h5b_get_3d_field_coords (
f, 0, field_name, H5BLOCK_FIELD_XCOORD_NAME,
coords, n_coords));
}
static inline h5_err_t
......@@ -455,9 +463,10 @@ H5Block3dGetFieldYCoords (
(h5_file_p)f,
field_name,
coords, (long long unsigned)n_coords);
H5_API_RETURN (h5b_get_3d_field_coords (
f, 1, field_name, H5BLOCK_FIELD_YCOORD_NAME,
coords, n_coords));
H5_API_RETURN (
h5b_get_3d_field_coords (
f, 1, field_name, H5BLOCK_FIELD_YCOORD_NAME,
coords, n_coords));
}
static inline h5_err_t
......@@ -474,9 +483,10 @@ H5Block3dGetFieldZCoords (
(h5_file_p)f,
field_name,
coords, (long long unsigned)n_coords);
H5_API_RETURN (h5b_get_3d_field_coords (
f, 2, field_name, H5BLOCK_FIELD_ZCOORD_NAME,
coords, n_coords));
H5_API_RETURN (
h5b_get_3d_field_coords (
f, 2, field_name, H5BLOCK_FIELD_ZCOORD_NAME,
coords, n_coords));
}
/*
......@@ -572,7 +582,7 @@ H5BlockWriteFieldAttribString (
f,
field_name,
attrib_name,
H5T_NATIVE_CHAR,
H5_STRING_T,
buffer,
strlen(buffer) + 1));
}
......@@ -590,13 +600,14 @@ H5BlockWriteFieldAttribFloat64 (
"f=%p, field_name='%s', attrib_name='%s', "
"buffer=%p, nelems=%lld",
(h5_file_p)f, field_name, attrib_name, buffer, (long long)nelems);
H5_API_RETURN (h5b_write_field_attrib (
f,
field_name,
attrib_name,
H5T_NATIVE_DOUBLE,
buffer,
nelems ));
H5_API_RETURN (
h5b_write_field_attrib (
f,
field_name,
attrib_name,
H5_FLOAT64_T,
buffer,
nelems));
}
static inline h5_err_t
......@@ -612,13 +623,14 @@ H5BlockWriteFieldAttribFloat32 (
"f=%p, field_name='%s', attrib_name='%s', "
"buffer=%p, nelems=%lld",
(h5_file_p)f, field_name, attrib_name, buffer, (long long)nelems);
H5_API_RETURN (h5b_write_field_attrib (
f,
field_name,
attrib_name,
H5T_NATIVE_FLOAT,
buffer,
nelems ));
H5_API_RETURN (
h5b_write_field_attrib (
f,
field_name,
attrib_name,
H5_FLOAT32_T,
buffer,
nelems));
}
static inline h5_err_t
......@@ -633,13 +645,14 @@ H5BlockWriteFieldAttribInt64 (
H5_API_ENTER (h5_err_t,
"f=%p, field_name='%s', attrib_name='%s', buffer=%p, nelems=%lld",
(h5_file_p)f, field_name, attrib_name, buffer, (long long)nelems);
H5_API_RETURN (h5b_write_field_attrib (
f,
field_name,
attrib_name,
H5T_NATIVE_INT64,
buffer,
nelems ));
H5_API_RETURN (
h5b_write_field_attrib (
f,
field_name,
attrib_name,
H5_INT64_T,
buffer,
nelems));
}
static inline h5_err_t
......@@ -655,13 +668,14 @@ H5BlockWriteFieldAttribInt32 (
"f=%p, field_name='%s', attrib_name='%s', "
"buffer=%p, nelems=%lld",
(h5_file_p)f, field_name, attrib_name, buffer, (long long)nelems);
H5_API_RETURN (h5b_write_field_attrib (
f,
field_name,
attrib_name,
H5T_NATIVE_INT32,
buffer,
nelems ));
H5_API_RETURN (
h5b_write_field_attrib (
f,
field_name,
attrib_name,
H5_INT32_T,
buffer,
nelems));
}
/*
......@@ -750,7 +764,7 @@ H5BlockReadFieldAttribString (
f,
field_name,
attrib_name,
H5_STRING,
H5_STRING_T,
(void*)buffer));
}
......@@ -765,12 +779,13 @@ H5BlockReadFieldAttribFloat64 (
H5_API_ENTER (h5_err_t,
"f=%p, field_name='%s', attrib_name='%s', buffer=%p",
(h5_file_p)f, field_name, attrib_name, buffer);
H5_API_RETURN (h5b_read_field_attrib (
f,
field_name,
attrib_name,
H5T_NATIVE_DOUBLE,
(void*)buffer ));
H5_API_RETURN (
h5b_read_field_attrib (
f,
field_name,
attrib_name,
H5_FLOAT64_T,
(void*)buffer));
}
static inline h5_err_t
......@@ -784,12 +799,13 @@ H5BlockReadFieldAttribFloat32 (
H5_API_ENTER (h5_err_t,
"f=%p, field_name='%s', attrib_name='%s', buffer=%p",
(h5_file_p)f, field_name, attrib_name, buffer);
H5_API_RETURN (h5b_read_field_attrib (
f,
field_name,
attrib_name,
H5T_NATIVE_FLOAT,
buffer ));
H5_API_RETURN (
h5b_read_field_attrib (
f,
field_name,
attrib_name,
H5_FLOAT32_T,
buffer));
}
static inline h5_err_t
......@@ -803,12 +819,13 @@ H5BlockReadFieldAttribInt64 (
H5_API_ENTER (h5_err_t,
"f=%p, field_name='%s', attrib_name='%s', buffer=%p",
(h5_file_p)f, field_name, attrib_name, buffer);
H5_API_RETURN (h5b_read_field_attrib (
f,
field_name,
attrib_name,
H5T_NATIVE_INT64,
buffer ));
H5_API_RETURN (
h5b_read_field_attrib (
f,
field_name,
attrib_name,
H5_INT64_T,
buffer));
}
static inline h5_err_t
......@@ -821,12 +838,13 @@ H5BlockReadFieldAttribInt32 (
H5_API_ENTER (h5_err_t,
"f=%p, field_name='%s', attrib_name='%s', buffer=%p",
(h5_file_p)f, field_name, attrib_name, buffer);
H5_API_RETURN (h5b_read_field_attrib (
f,
field_name,
attrib_name,
H5T_NATIVE_INT32,
(void*)buffer ));
H5_API_RETURN (
h5b_read_field_attrib (
f,
field_name,
attrib_name,
H5_INT32_T,
(void*)buffer));
}
///< @}
......
......@@ -92,7 +92,8 @@ H5Block3dWriteScalarFieldFloat64 (
(h5_file_p)f, name, buffer);
H5_API_RETURN (
h5b_write_scalar_data (
f, name, (void*)buffer, H5T_NATIVE_DOUBLE ));
f, name, (void*)buffer,
H5_FLOAT64_T));
}
static inline h5_err_t
......@@ -107,7 +108,8 @@ H5Block3dWriteScalarFieldFloat32 (
(h5_file_p)f, name, buffer);
H5_API_RETURN (
h5b_write_scalar_data (
f, name, buffer, H5T_NATIVE_FLOAT ));
f, name, buffer,
H5_FLOAT32_T));
}
static inline h5_err_t
......@@ -122,7 +124,7 @@ H5Block3dWriteScalarFieldInt64 (
(h5_file_p)f, name, buffer);
H5_API_RETURN (
h5b_write_scalar_data (
f, name, buffer, H5T_NATIVE_INT64 ));
f, name, buffer, H5_INT64_T));
}
static inline h5_err_t
......@@ -137,7 +139,8 @@ H5Block3dWriteScalarFieldInt32 (
(h5_file_p)f, name, buffer);
H5_API_RETURN (
h5b_write_scalar_data (
f, name, buffer, H5T_NATIVE_INT32 ));
f, name, buffer,
H5_INT32_T));
}
/*
......@@ -200,7 +203,8 @@ H5Block3dReadScalarFieldFloat64 (
(h5_file_p)f, name, buffer);
H5_API_RETURN (
h5b_read_scalar_data (
f, name, (void*)buffer, H5T_NATIVE_DOUBLE));
f, name, (void*)buffer,
H5_FLOAT64_T));
}
static inline h5_err_t
......@@ -215,7 +219,8 @@ H5Block3dReadScalarFieldFloat32 (
(h5_file_p)f, name, buffer);
H5_API_RETURN (
h5b_read_scalar_data (
f, name, buffer, H5T_NATIVE_FLOAT));
f, name, buffer,
H5_FLOAT32_T));
}
static inline h5_err_t
......@@ -230,7 +235,7 @@ H5Block3dReadScalarFieldInt64 (
(h5_file_p)f, name, buffer);
H5_API_RETURN (
h5b_read_scalar_data (
f, name, buffer, H5T_NATIVE_INT64));
f, name, buffer, H5_INT64_T));
}
static inline h5_err_t
......@@ -245,7 +250,8 @@ H5Block3dReadScalarFieldInt32 (
(h5_file_p)f, name, buffer);
H5_API_RETURN (
h5b_read_scalar_data (
f, name, buffer, H5T_NATIVE_INT32));
f, name, buffer,
H5_INT32_T));
}
/*
......@@ -332,7 +338,7 @@ H5Block3dWriteVector3dFieldFloat64 (
h5b_write_vector3d_data(
f, name,
(void*)x_buf, (void*)y_buf, (void*)z_buf,
H5T_NATIVE_DOUBLE));
H5_FLOAT64_T));
}
static inline h5_err_t
......@@ -351,7 +357,7 @@ H5Block3dWriteVector3dFieldFloat32 (
h5b_write_vector3d_data (
f, name,
x_buf, y_buf, z_buf,
H5T_NATIVE_FLOAT));
H5_FLOAT32_T));
}
static inline h5_err_t
......@@ -370,7 +376,7 @@ H5Block3dWriteVector3dFieldInt64 (
h5b_write_vector3d_data (
f, name,
x_buf, y_buf, z_buf,
H5T_NATIVE_INT64));
H5_INT64_T));
}
static inline h5_err_t
......@@ -389,7 +395,7 @@ H5Block3dWriteVector3dFieldInt32 (
h5b_write_vector3d_data(
f, name,
x_buf, y_buf, z_buf,
H5T_NATIVE_INT32));
H5_INT32_T));
}
/*
......@@ -470,7 +476,7 @@ H5Block3dReadVector3dFieldFloat64 (
h5b_read_vector3d_data (
f, name,
x_buf, y_buf, z_buf,
H5T_NATIVE_DOUBLE));
H5_FLOAT64_T));
}
static inline h5_err_t
......@@ -489,7 +495,7 @@ H5Block3dReadVector3dFieldFloat32 (
h5b_read_vector3d_data (
f, name,
x_buf, y_buf, z_buf,
H5T_NATIVE_FLOAT));
H5_FLOAT32_T));
}
static inline h5_err_t
......@@ -508,7 +514,7 @@ H5Block3dReadVector3dFieldInt64 (
h5b_read_vector3d_data (
f, name,
x_buf, y_buf, z_buf,
H5T_NATIVE_INT64));
H5_INT64_T));
}
static inline h5_err_t
......@@ -527,7 +533,7 @@ H5Block3dReadVector3dFieldInt32 (
h5b_read_vector3d_data (
f, name,
x_buf, y_buf, z_buf,
H5T_NATIVE_INT32));
H5_INT32_T));
}
///< @}
......
......@@ -96,7 +96,10 @@ H5PartWriteDataFloat64 (
H5_API_ENTER (h5_err_t,
"f=%p, name='%s', date=%p",
(h5_file_p)f, name, data);
H5_API_RETURN (h5u_write_data (f, name, (void*)data, H5T_NATIVE_DOUBLE));
H5_API_RETURN (
h5u_write_data (
f, name, (void*)data,
H5_FLOAT64_T));
}
static inline h5_err_t
......@@ -108,7 +111,10 @@ H5PartWriteDataFloat32 (
H5_API_ENTER (h5_err_t,
"f=%p, name='%s', date=%p",
(h5_file_p)f, name, data);
H5_API_RETURN (h5u_write_data(f, name, (void*)data, H5T_NATIVE_FLOAT));
H5_API_RETURN (
h5u_write_data(
f, name, (void*)data,
H5_FLOAT32_T));
}
static inline h5_err_t
......@@ -120,7 +126,10 @@ H5PartWriteDataInt64 (
H5_API_ENTER (h5_err_t,
"f=%p, name='%s', date=%p",
(h5_file_p)f, name, data);
H5_API_RETURN (h5u_write_data (f, name, (void*)data, H5T_NATIVE_INT64));
H5_API_RETURN (
h5u_write_data (
f, name, (void*)data,
H5_INT64_T));
}
static inline h5_err_t
......@@ -132,7 +141,10 @@ H5PartWriteDataInt32 (
H5_API_ENTER (h5_err_t,
"f=%p, name='%s', date=%p",
(h5_file_p)f, name, data);
H5_API_RETURN (h5u_write_data (f, name, (void*)data, H5T_NATIVE_INT32));
H5_API_RETURN (
h5u_write_data (
f, name, (void*)data,
H5_INT32_T));
}
/**
......@@ -185,7 +197,9 @@ H5PartReadDataFloat64 (
H5_API_ENTER (h5_err_t,
"f=%p, name='%s', date=%p",
(h5_file_p)f, name, data);
H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_DOUBLE));
H5_API_RETURN (
h5u_read_data (
f, name, data, H5_FLOAT64_T));
}
static inline h5_err_t
......@@ -197,7 +211,9 @@ H5PartReadDataFloat32 (
H5_API_ENTER (h5_err_t,
"f=%p, name='%s', date=%p",
(h5_file_p)f, name, data);
H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_FLOAT));
H5_API_RETURN (
h5u_read_data (
f, name, data, H5_FLOAT32_T));
}
static inline h5_err_t
......@@ -209,7 +225,10 @@ H5PartReadDataInt64 (
H5_API_ENTER (h5_err_t,
"f=%p, name='%s', date=%p",
(h5_file_p)f, name, data);
H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_INT64));
H5_API_RETURN (
h5u_read_data (
f, name, data,
H5_INT64_T));
}
static inline h5_err_t
......@@ -221,7 +240,10 @@ H5PartReadDataInt32 (
H5_API_ENTER (h5_err_t,
"f=%p, name='%s', date=%p",
(h5_file_p)f, name, data);
H5_API_RETURN (h5u_read_data (f, name, data, H5T_NATIVE_INT32));
H5_API_RETURN (
h5u_read_data (
f, name, data,
H5_INT32_T));
}
#ifdef __cplusplus
......
......@@ -83,12 +83,13 @@ H5GetFileAttribInfo (
(long long unsigned)len_attrib_name,
attrib_type,
nelems);
H5_API_RETURN (h5_get_file_attrib_info_by_idx (
f,
idx,
attrib_name, len_attrib_name,
attrib_type,
nelems));
H5_API_RETURN (
h5_get_file_attrib_info_by_idx (
f,
idx,
attrib_name, len_attrib_name,
attrib_type,
nelems));
}
/**
......@@ -135,10 +136,11 @@ H5GetFileAttribInfoByName (
(h5_file_p)f,
attrib_name,
attrib_type, nelems);
H5_API_RETURN (h5_get_file_attrib_info_by_name (
f,
attrib_name,
attrib_type, nelems));
H5_API_RETURN (
h5_get_file_attrib_info_by_name (
f,
attrib_name,
attrib_type, nelems));
}
/*
......@@ -217,12 +219,13 @@ H5WriteFileAttribString (
H5_API_ENTER (h5_err_t,
"f=%p, attrib_name='%s', buffer='%s'",
(h5_file_p)f, attrib_name, buffer);
H5_API_RETURN (h5_write_file_attrib (
f,
attrib_name,
H5T_NATIVE_CHAR,
buffer,
strlen(buffer) + 1 ));
H5_API_RETURN (
h5_write_file_attrib (
f,
attrib_name,
H5_STRING_T,
buffer,
strlen(buffer) + 1 ));
}
static inline h5_err_t
......@@ -235,12 +238,13 @@ H5WriteFileAttribFloat64 (
H5_API_ENTER (h5_err_t,
"f=%p, attrib_name='%s', buffers=%p, nelems=%llu",
(h5_file_p)f, attrib_name, buffers, (long long unsigned)nelems);
H5_API_RETURN (h5_write_file_attrib (
f,
attrib_name,
H5T_NATIVE_DOUBLE,
buffers,
nelems));
H5_API_RETURN (
h5_write_file_attrib (
f,
attrib_name,
H5_FLOAT64_T,
buffers,
nelems));
}
static inline h5_err_t
......@@ -253,12 +257,13 @@ H5WriteFileAttribFloat32 (