Salome HOME
projects
/
modules
/
kernel.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
d0e9cf50547bcc079eba891636a6f3d3c2ce7f0c
[modules/kernel.git]
/
src
/
HDFPersist
/
HDFdatasetGetnDim.c
1
#include "hdfi.h"
2
#include <hdf5.h>
3
4
int
5
HDFdatasetGetnDim(hdf_idt id)
6
{
7
int ndim;
8
hdf_idt space_id;
9
hdf_err ret;
10
11
if ((space_id = H5Dget_space(id)) < 0)
12
return -1;
13
14
if ((ndim = H5Sget_simple_extent_ndims(space_id)) < 0)
15
return -1;
16
17
if ((ret = H5Sclose(space_id)) < 0)
18
return -1;
19
20
return ndim;
21
}