Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
105 views
in Technique[技术] by (71.8m points)

How to enable the H5P_SET_CREATE_INTERMEDIATE_GROUP property in C++ API of HDF5 library?

When working with C API of HDF5 library, it is possible to create a property list for the intermediate group creation property like below and use it in other functions:

// enabling group creation with full qualified names
hid_t prop_list = H5Pcreate(H5P_LINK_CREATE);
H5Pset_create_intermediate_group(prop_list , 1);

// ....
H5Dcreate(file, datasetName, dataType, dataSpace, prop_list);

I am trying to do the same with C++ API like this:

DSetCreatPropList prop_list;
prop_list.setProperty("", ""); // what to do here?

// ...
file.createDataSet(datasetName, dataType, dataSpace, prop_list);

How I should initialize prop_list here in C++ API?

question from:https://stackoverflow.com/questions/65850305/how-to-enable-the-h5p-set-create-intermediate-group-property-in-c-api-of-hdf5

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you are not bound to a specific C++ library take a look at HDFql as it allows you to create a certain dataset and eventually a group (and nested groups) on-the-fly. Example:

HDFql::execute("create dataset my_group/my_subgroup/my_dataset as int"); 

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...