Contents

H5P.get_layout

Determine layout of raw data for dataset

Syntax

layout = H5P.get_layout(dcpl)

Description

layout = H5P.get_layout(dcpl) returns the layout of the raw data for the dataset specified by the dataset creation property list, dcpl. Possible values are: H5D_COMPACT, H5D_CONTIGUOUS, or H5D_CHUNKED.

Examples

fid = H5F.open('example.h5');
dset_id = H5D.open(fid,'/g3/integer');
dcpl = H5D.get_create_plist(dset_id);
layout = H5P.get_layout(dcpl);
switch(layout)
    case H5ML.get_constant_value('H5D_COMPACT')
        fprintf('layout is compact\n');
    case H5ML.get_constant_value('H5D_CONTIGUOUS')
        fprintf('layout is contiguous\n');
    case H5ML.get_constant_value('H5D_CHUNKED')
        fprintf('layout is chunked\n');
end

See Also

Was this topic helpful?