Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TurTLE
TurTLE
Commits
594b81fe
Commit
594b81fe
authored
Aug 29, 2019
by
Cristian Lalescu
Browse files
add timing output to hdf5_tools
parent
5355899f
Changes
1
Hide whitespace changes
Inline
Side-by-side
cpp/hdf5_tools.cpp
View file @
594b81fe
#include
"hdf5_tools.hpp"
#include
"scope_timer.hpp"
#include
<cfloat>
#include
<climits>
int
hdf5_tools
::
require_size_single_dataset
(
hid_t
dset
,
int
tsize
)
{
TIMEZONE
(
"hdf5_tools::require_size_single_dataset"
);
int
ndims
;
hsize_t
space
;
space
=
H5Dget_space
(
dset
);
...
...
@@ -24,6 +26,7 @@ int hdf5_tools::require_size_single_dataset(hid_t dset, int tsize)
int
hdf5_tools
::
grow_single_dataset
(
hid_t
dset
,
int
tincrement
)
{
TIMEZONE
(
"hdf5_tools::grow_single_dataset"
);
int
ndims
;
hsize_t
space
;
space
=
H5Dget_space
(
dset
);
...
...
@@ -48,6 +51,7 @@ herr_t hdf5_tools::require_size_dataset_visitor(
const
H5O_info_t
*
info
,
void
*
op_data
)
{
TIMEZONE
(
"hdf5_tools::require_size_dataset_visitor"
);
if
(
info
->
type
==
H5O_TYPE_DATASET
)
{
hsize_t
dset
=
H5Dopen
(
o_id
,
name
,
H5P_DEFAULT
);
...
...
@@ -63,6 +67,7 @@ herr_t hdf5_tools::grow_dataset_visitor(
const
H5O_info_t
*
info
,
void
*
op_data
)
{
TIMEZONE
(
"hdf5_tools::grow_dataset_visitor"
);
if
(
info
->
type
==
H5O_TYPE_DATASET
)
{
hsize_t
dset
=
H5Dopen
(
o_id
,
name
,
H5P_DEFAULT
);
...
...
@@ -78,6 +83,7 @@ int hdf5_tools::grow_file_datasets(
const
std
::
string
group_name
,
int
tincrement
)
{
TIMEZONE
(
"hdf5_tools::grow_file_datasets"
);
int
file_problems
=
0
;
hid_t
group
;
...
...
@@ -98,6 +104,7 @@ int hdf5_tools::require_size_file_datasets(
const
std
::
string
group_name
,
int
tsize
)
{
TIMEZONE
(
"hdf5_tools::require_size_file_datasets"
);
int
file_problems
=
0
;
hid_t
group
;
...
...
@@ -117,6 +124,7 @@ std::vector<number> hdf5_tools::read_vector(
const
hid_t
group
,
const
std
::
string
dset_name
)
{
TIMEZONE
(
"hdf5_tools::read_vector"
);
std
::
vector
<
number
>
result
;
hsize_t
vector_length
;
// first, read size of array
...
...
@@ -143,6 +151,7 @@ number hdf5_tools::read_value(
const
hid_t
group
,
const
std
::
string
dset_name
)
{
TIMEZONE
(
"hdf5_tools::read_value"
);
number
result
;
hid_t
dset
;
hid_t
mem_dtype
;
...
...
@@ -177,6 +186,7 @@ std::vector<dtype> hdf5_tools::read_vector_with_single_rank(
const
hid_t
file_id
,
const
std
::
string
dset_name
)
{
TIMEZONE
(
"hdf5_tools::read_vector_with_single_rank"
);
std
::
vector
<
dtype
>
data
;
int
vector_size
;
if
(
myrank
==
rank_to_use
)
...
...
@@ -208,6 +218,7 @@ std::string hdf5_tools::read_string(
const
hid_t
group
,
const
std
::
string
dset_name
)
{
TIMEZONE
(
"hdf5_tools::read_string"
);
if
(
H5Lexists
(
group
,
dset_name
.
c_str
(),
H5P_DEFAULT
))
{
hid_t
dset
=
H5Dopen
(
group
,
dset_name
.
c_str
(),
H5P_DEFAULT
);
...
...
Write
Preview
Supports
Markdown
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