8 if (
sizeof(
bool) ==
sizeof(
int)) {
10 }
else if (
sizeof(
bool) ==
sizeof(
short)) {
11 return H5T_NATIVE_SHORT;
12 }
else if (
sizeof(
bool) ==
sizeof(
char)) {
13 return H5T_NATIVE_CHAR;
15 return H5T_NATIVE_CHAR;
21 const char *attr_name,
26 if (mem_type_id == H5T_NATIVE_DOUBLE) {
27 return H5LTset_attribute_double(loc_id, obj_name, attr_name, (
double *)buffer, size);
28 }
else if (mem_type_id == H5T_NATIVE_FLOAT) {
29 return H5LTset_attribute_float(loc_id, obj_name, attr_name, (
float *)buffer, size);
30 }
else if (mem_type_id == H5T_NATIVE_INT) {
31 return H5LTset_attribute_int(loc_id, obj_name, attr_name, (
int *)buffer, size);
32 }
else if (mem_type_id == H5T_NATIVE_UINT) {
33 return H5LTset_attribute_uint(loc_id, obj_name, attr_name, (
unsigned *)buffer, size);
34 }
else if (mem_type_id == H5T_NATIVE_SHORT) {
35 return H5LTset_attribute_short(loc_id, obj_name, attr_name, (
short *)buffer, size);
36 }
else if (mem_type_id == H5T_NATIVE_CHAR) {
37 return H5LTset_attribute_char(loc_id, obj_name, attr_name, (
char *)buffer, size);
47 if(type==H5T_NATIVE_DOUBLE){
49 }
else if(type==H5T_NATIVE_LDOUBLE){
51 }
else if(type==H5T_NATIVE_INT){
53 }
else if(type==H5T_NATIVE_LONG){
55 }
else if(type==H5T_NATIVE_ULONG){
56 return "unsigned long";
57 }
else if(type==H5T_NATIVE_UINT){
58 return "unsigned int";
59 }
else if(type==H5T_NATIVE_FLOAT){
61 }
else if(type==H5T_NATIVE_USHORT){
62 return "unsigned short";
63 }
else if(type==H5T_NATIVE_SHORT){
65 }
else if(type==H5T_NATIVE_CHAR){
herr_t H5LTset_attribute(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t mem_type_id, void *buffer, size_t size)
std::string H5TypeToString(hid_t type)