Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
H5hut
src
Commits
92d0cc5a
Commit
92d0cc5a
authored
Aug 02, 2011
by
gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
write zero-particle bug fixed
parent
329a72fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
11 deletions
+35
-11
src/h5core/h5_hdf5_private.h
src/h5core/h5_hdf5_private.h
+17
-0
src/h5core/h5u_model.c
src/h5core/h5u_model.c
+18
-11
No files found.
src/h5core/h5_hdf5_private.h
View file @
92d0cc5a
...
...
@@ -322,6 +322,23 @@ hdf5_select_elements_of_dataspace (
HDF5_WRAPPER_RETURN
(
H5_SUCCESS
);
}
static
inline
h5_err_t
hdf5_select_none
(
hid_t
space_id
)
{
HDF5_WRAPPER_ENTER1
(
h5_err_t
,
"%d"
,
space_id
);
herr_t
herr
=
H5Sselect_none
(
space_id
);
if
(
herr
<
0
)
{
HDF5_WRAPPER_LEAVE
(
h5_error
(
H5_ERR_HDF5
,
"Selection for writing zero-length data failed"
));
}
HDF5_WRAPPER_RETURN
(
H5_SUCCESS
);
}
static
inline
h5_ssize_t
hdf5_get_selected_npoints_of_dataspace
(
hid_t
space_id
...
...
src/h5core/h5u_model.c
View file @
92d0cc5a
...
...
@@ -65,7 +65,7 @@ h5u_set_num_particles (
hsize_t
total
;
hsize_t
dmax
=
H5S_UNLIMITED
;
if
(
nparticles
<
=
0
)
if
(
nparticles
<
0
)
H5_CORE_API_LEAVE
(
h5_error
(
H5_ERR_INVAL
,
...
...
@@ -154,11 +154,15 @@ h5u_set_num_particles (
count
=
nparticles
;
hstride
=
1
;
TRY
(
hdf5_select_hyperslab_of_dataspace
(
u
->
diskshape
,
H5S_SELECT_SET
,
&
start
,
&
hstride
,
&
count
,
NULL
)
);
if
(
count
>
0
)
{
TRY
(
hdf5_select_hyperslab_of_dataspace
(
u
->
diskshape
,
H5S_SELECT_SET
,
&
start
,
&
hstride
,
&
count
,
NULL
)
);
}
else
{
hdf5_select_none
(
u
->
diskshape
);
}
#endif
H5_CORE_API_RETURN
(
H5_SUCCESS
);
}
...
...
@@ -313,11 +317,14 @@ h5u_set_view_indices (
/* declare local memory datasize */
total
=
u
->
nparticles
;
TRY
(
u
->
memshape
=
hdf5_create_dataspace
(
1
,
&
total
,
&
dmax
));
TRY
(
hdf5_select_elements_of_dataspace
(
u
->
diskshape
,
H5S_SELECT_SET
,
(
hsize_t
)
nelems
,
(
hsize_t
*
)
indices
)
);
if
(
nelems
>
0
)
{
TRY
(
hdf5_select_elements_of_dataspace
(
u
->
diskshape
,
H5S_SELECT_SET
,
(
hsize_t
)
nelems
,
(
hsize_t
*
)
indices
)
);
}
else
{
TRY
(
hdf5_select_none
(
u
->
diskshape
));
}
u
->
viewindexed
=
1
;
H5_CORE_API_RETURN
(
H5_SUCCESS
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment