Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ node {

builders['macOS-release'] = get_macos_pipeline('Release')
builders['macOS-debug'] = get_macos_pipeline('Debug')
builders['Windows10'] = get_win10_pipeline()
// builders['Windows10'] = get_win10_pipeline()
//builders['Debian10/Meson'] = get_meson_debian_pipeline()


Expand Down
2 changes: 1 addition & 1 deletion conanfile_macos.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[requires]
boost/1.69.0
hdf5/1.10.6
zlib/1.2.8
zlib/1.2.11
bzip2/1.0.8

[generators]
Expand Down
15 changes: 5 additions & 10 deletions src/h5cpp/node/dataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Node Dataset::create_dataset(const Group &base,
// implementation of public member functions
//=============================================================================
Dataset::Dataset(const Node &node):
Node(node)
Node(node)
{
if(node.type()!=Type::Dataset)
{
Expand Down Expand Up @@ -242,10 +242,6 @@ void resize_by(const Dataset &dataset,size_t dimension_index,ssize_t delta)
throw std::runtime_error(ss.str());
}

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsign-compare"
#endif
if((delta<0) && (current_dims[dimension_index] < static_cast<hsize_t>(std::abs(delta))))
{
std::stringstream ss;
Expand All @@ -255,11 +251,10 @@ void resize_by(const Dataset &dataset,size_t dimension_index,ssize_t delta)
<<" would be negative";
throw std::runtime_error(ss.str());
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif

current_dims[dimension_index] += signed2unsigned<unsigned long long>(delta);
if (delta < 0)
current_dims[dimension_index] -= signed2unsigned<unsigned long long>(-delta);
else
current_dims[dimension_index] += signed2unsigned<unsigned long long>(delta);
dataset.resize(current_dims);
}

Expand Down
17 changes: 2 additions & 15 deletions src/h5cpp/property/dataset_transfer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ DatasetTransferList::DatasetTransferList(ObjectHandle &&handle, bool do_check):

#ifdef WITH_MPI

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
std::ostream &operator<<(std::ostream &stream,const MPITransferMode &mode)
{
switch(mode)
Expand All @@ -63,16 +59,10 @@ std::ostream &operator<<(std::ostream &stream,const MPITransferMode &mode)
case MPITransferMode::Collective:
return stream<<"COLLECTIVE";
}
return stream;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif


#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
std::ostream &operator<<(std::ostream &stream,const MPIChunkOption &option)
{
switch(option)
Expand All @@ -82,11 +72,8 @@ std::ostream &operator<<(std::ostream &stream,const MPIChunkOption &option)
case MPIChunkOption::MultiChunk:
return stream<<"MULTI_CHUNK";
}
return stream;
}
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif


void DatasetTransferList::mpi_transfer_mode(MPITransferMode mode) const
{
Expand Down
6 changes: 6 additions & 0 deletions test/node/dataset_extent_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ SCENARIO("testing the extent of a dataset") {
REQUIRE_NOTHROW(dataset.extent(0, 123));
THEN("the actual dimensions reads 123") {
REQUIRE(current_dimension(dataset) == 123ul);
AND_WHEN("shrinking the elements for a single dimension using extent()") {
REQUIRE_NOTHROW(dataset.extent(0, -3));
THEN("the actual dimensions reads 120") {
REQUIRE(current_dimension(dataset) == 120ul);
}
}
}
}

Expand Down