Skip to content

Commit

Permalink
Merge pull request #27 from HDFGroup/feature/vfd_swmr
Browse files Browse the repository at this point in the history
Feature/vfd swmr
  • Loading branch information
vchoi-hdfgroup authored Jun 30, 2021
2 parents df20a8b + b9dbabc commit fd01486
Show file tree
Hide file tree
Showing 146 changed files with 5,570 additions and 4,042 deletions.
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CMakeTests.* @byrnHDF @derobins

/doc/ @gnuoyd @jrmainzer

/examples/ @lrknox @derobins @bljhdf
/examples/ @lrknox @derobins @bmribler

/fortran/ @brtnfld @epourmal

Expand All @@ -29,7 +29,7 @@ CMakeTests.* @byrnHDF @derobins

/m4/ @lrknox @derobins

/release_docs/ @lrknox @bljhdf @byrnHDF
/release_docs/ @lrknox @bmribler @byrnHDF

/src/ @jhendersonHDF @derobins @fortnern @qkoziol @soumagne @vchoi-hdfgroup @jrmainzer

Expand Down
3 changes: 2 additions & 1 deletion MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -1412,11 +1412,12 @@
./test/vfd_swmr.c
./test/vfd_swmr_addrem_writer.c
./test/vfd_swmr_attrdset_writer.c
./test/vfd_swmr_dsetops_writer.c
./test/vfd_swmr_dsetchks_writer.c
./test/vfd_swmr_bigset_writer.c
./test/vfd_swmr_check_compat.c
./test/vfd_swmr_common.c
./test/vfd_swmr_common.h
./test/vfd_swmr_dsetops_writer.c
./test/vfd_swmr_generator.c
./test/vfd_swmr_group_writer.c
./test/vfd_swmr_reader.c
Expand Down
2 changes: 1 addition & 1 deletion bin/trace
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ sub rewrite_func ($$$$$) {

# Compose the trace macro
$trace = "H5TRACE" . scalar(@arg_str) . "(\"$rettype\", \"";
$argtrace = "H5ARG_TRACE" . scalar(@arg_str) . "(FUNC, \"";
$argtrace = "H5ARG_TRACE" . scalar(@arg_str) . "(__func__, \"";
$trace .= join("", @arg_str) . "\"";
$argtrace .= join("", @arg_str) . "\"";

Expand Down
6 changes: 3 additions & 3 deletions c++/src/H5ArrayType.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class H5_DLLCPP ArrayType : public DataType {

// Returns an ArrayType object via DataType* by decoding the
// binary object description of this type.
virtual DataType *decode() const H5_OVERRIDE;
virtual DataType *decode() const override;

// Returns the number of dimensions of this array datatype.
int getArrayNDims() const;
Expand All @@ -49,7 +49,7 @@ class H5_DLLCPP ArrayType : public DataType {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("ArrayType");
}
Expand All @@ -61,7 +61,7 @@ class H5_DLLCPP ArrayType : public DataType {
ArrayType(const hid_t existing_id);

// Noop destructor
virtual ~ArrayType() H5_OVERRIDE;
virtual ~ArrayType() override;

// Default constructor
ArrayType();
Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5AtomType.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class H5_DLLCPP AtomType : public DataType {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("AtomType");
}
Expand All @@ -68,7 +68,7 @@ class H5_DLLCPP AtomType : public DataType {
AtomType(const AtomType &original);

// Noop destructor
virtual ~AtomType() H5_OVERRIDE;
virtual ~AtomType() override;
#endif // DOXYGEN_SHOULD_SKIP_THIS

protected:
Expand Down
14 changes: 7 additions & 7 deletions c++/src/H5Attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <iostream>
#include <string>

#include "H5private.h" // for HDfree
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
Expand Down Expand Up @@ -313,7 +312,7 @@ Attribute::getName() const
H5std_string attr_name; // attribute name to return

// Preliminary call to get the size of the attribute name
ssize_t name_size = H5Aget_name(id, static_cast<size_t>(0), NULL);
ssize_t name_size = H5Aget_name(id, 0, NULL);

// If H5Aget_name failed, throw exception
if (name_size < 0) {
Expand All @@ -324,8 +323,8 @@ Attribute::getName() const
}
// Attribute's name exists, retrieve it
else if (name_size > 0) {
char *name_C = new char[name_size + 1]; // temporary C-string
HDmemset(name_C, 0, name_size + 1); // clear buffer
// Create buffer for C string
char *name_C = new char[name_size + 1]();

// Use overloaded function
name_size = getName(name_C, name_size + 1);
Expand All @@ -336,6 +335,7 @@ Attribute::getName() const
// Clean up resource
delete[] name_C;
}

// Return attribute's name
return (attr_name);
}
Expand Down Expand Up @@ -393,8 +393,8 @@ Attribute::getName(H5std_string &attr_name, size_t len) const
}
// If length is provided, get that number of characters in name
else {
char *name_C = new char[len + 1]; // temporary C-string
HDmemset(name_C, 0, len + 1); // clear buffer
// Create buffer for C string
char *name_C = new char[len + 1]();

// Use overloaded function
name_size = getName(name_C, len + 1);
Expand Down Expand Up @@ -551,7 +551,7 @@ Attribute::p_read_variable_len(const DataType &mem_type, H5std_string &strg) con

// Get string from the C char* and release resource allocated by C API
strg = strg_C;
HDfree(strg_C);
free(strg_C);
}

#ifndef DOXYGEN_SHOULD_SKIP_THIS
Expand Down
18 changes: 9 additions & 9 deletions c++/src/H5Attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
Attribute(const hid_t attr_id);

// Closes this attribute.
virtual void close() H5_OVERRIDE;
virtual void close() override;

// Gets the name of this attribute.
ssize_t getName(char *attr_name, size_t buf_size = 0) const;
Expand All @@ -50,13 +50,13 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
ssize_t getName(size_t buf_size, H5std_string &attr_name) const;

// Gets a copy of the dataspace for this attribute.
virtual DataSpace getSpace() const H5_OVERRIDE;
virtual DataSpace getSpace() const override;

// Returns the amount of storage size required for this attribute.
virtual hsize_t getStorageSize() const H5_OVERRIDE;
virtual hsize_t getStorageSize() const override;

// Returns the in memory size of this attribute's data.
virtual size_t getInMemDataSize() const H5_OVERRIDE;
virtual size_t getInMemDataSize() const override;

// Reads data from this attribute.
void read(const DataType &mem_type, void *buf) const;
Expand All @@ -68,21 +68,21 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("Attribute");
}

// Gets the attribute id.
virtual hid_t getId() const H5_OVERRIDE;
virtual hid_t getId() const override;

// Destructor: properly terminates access to this attribute.
virtual ~Attribute() H5_OVERRIDE;
virtual ~Attribute() override;

#ifndef DOXYGEN_SHOULD_SKIP_THIS
protected:
// Sets the attribute id.
virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS

private:
Expand All @@ -92,7 +92,7 @@ class H5_DLLCPP Attribute : public AbstractDs, public H5Location {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_get_type() const H5_OVERRIDE;
virtual hid_t p_get_type() const override;

// Reads variable or fixed len strings from this attribute.
void p_read_variable_len(const DataType &mem_type, H5std_string &strg) const;
Expand Down
1 change: 0 additions & 1 deletion c++/src/H5CommonFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <string>

#include "H5private.h" // for HDstrcpy
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
Expand Down
6 changes: 3 additions & 3 deletions c++/src/H5CompType.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class H5_DLLCPP CompType : public DataType {

// Returns a CompType object via DataType* by decoding the binary
// object description of this type.
virtual DataType *decode() const H5_OVERRIDE;
virtual DataType *decode() const override;

// Returns the type class of the specified member of this compound
// datatype. It provides to the user a way of knowing what type
Expand Down Expand Up @@ -108,13 +108,13 @@ class H5_DLLCPP CompType : public DataType {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("CompType");
}

// Noop destructor.
virtual ~CompType() H5_OVERRIDE;
virtual ~CompType() override;

private:
// Contains common code that is used by the member functions
Expand Down
4 changes: 2 additions & 2 deletions c++/src/H5DaccProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("DSetAccPropList");
}
Expand All @@ -51,7 +51,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList {
DSetAccPropList(const hid_t plist_id);

// Noop destructor.
virtual ~DSetAccPropList() H5_OVERRIDE;
virtual ~DSetAccPropList() override;

#ifndef DOXYGEN_SHOULD_SKIP_THIS

Expand Down
7 changes: 3 additions & 4 deletions c++/src/H5DataSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <iostream>
#include <string>

#include "H5private.h" // for HDfree
#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
Expand Down Expand Up @@ -717,8 +716,8 @@ DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, con

// If there is data, allocate buffer and read it.
if (data_size > 0) {
char *strg_C = new char[data_size + 1];
HDmemset(strg_C, 0, data_size + 1); // clear buffer
// Create buffer for C string
char *strg_C = new char[data_size + 1]();

herr_t ret_value = H5Dread(id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, strg_C);

Expand Down Expand Up @@ -759,7 +758,7 @@ DataSet::p_read_variable_len(const hid_t mem_type_id, const hid_t mem_space_id,

// Get string from the C char* and release resource allocated by C API
strg = strg_C;
HDfree(strg_C);
free(strg_C);
}

#ifndef DOXYGEN_SHOULD_SKIP_THIS
Expand Down
18 changes: 9 additions & 9 deletions c++/src/H5DataSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace H5 {
class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
public:
// Close this dataset.
virtual void close() H5_OVERRIDE;
virtual void close() override;

// Extends the dataset with unlimited dimension.
void extend(const hsize_t *size) const;
Expand All @@ -53,16 +53,16 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
haddr_t getOffset() const;

// Gets the dataspace of this dataset.
virtual DataSpace getSpace() const H5_OVERRIDE;
virtual DataSpace getSpace() const override;

// Determines whether space has been allocated for a dataset.
void getSpaceStatus(H5D_space_status_t &status) const;

// Returns the amount of storage size required for this dataset.
virtual hsize_t getStorageSize() const H5_OVERRIDE;
virtual hsize_t getStorageSize() const override;

// Returns the in memory size of this attribute's data.
virtual size_t getInMemDataSize() const H5_OVERRIDE;
virtual size_t getInMemDataSize() const override;

// Returns the number of bytes required to store VL data.
hsize_t getVlenBufSize(const DataType &type, const DataSpace &space) const;
Expand Down Expand Up @@ -100,7 +100,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("DataSet");
}
Expand All @@ -124,15 +124,15 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
DataSet(const hid_t existing_id);

// Gets the dataset id.
virtual hid_t getId() const H5_OVERRIDE;
virtual hid_t getId() const override;

// Destructor: properly terminates access to this dataset.
virtual ~DataSet() H5_OVERRIDE;
virtual ~DataSet() override;

protected:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
// Sets the dataset id.
virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
virtual void p_setId(const hid_t new_id) override;
#endif // DOXYGEN_SHOULD_SKIP_THIS

private:
Expand All @@ -142,7 +142,7 @@ class H5_DLLCPP DataSet : public H5Object, public AbstractDs {
// getTypeClass and various API functions getXxxType
// defined in AbstractDs for generic datatype and specific
// sub-types
virtual hid_t p_get_type() const H5_OVERRIDE;
virtual hid_t p_get_type() const override;

// Reads variable or fixed len strings from this dataset.
void p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, const hid_t file_space_id,
Expand Down
10 changes: 5 additions & 5 deletions c++/src/H5DataSpace.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class H5_DLLCPP DataSpace : public IdComponent {
DataSpace &operator=(const DataSpace &rhs);

// Closes this dataspace.
virtual void close() H5_OVERRIDE;
virtual void close() override;

// Makes copy of an existing dataspace.
void copy(const DataSpace &like_space);
Expand Down Expand Up @@ -115,25 +115,25 @@ class H5_DLLCPP DataSpace : public IdComponent {

///\brief Returns this class name.
virtual H5std_string
fromClass() const H5_OVERRIDE
fromClass() const override
{
return ("DataSpace");
}

// Gets the dataspace id.
virtual hid_t getId() const H5_OVERRIDE;
virtual hid_t getId() const override;

// Deletes the global constant
static void deleteConstants();

// Destructor: properly terminates access to this dataspace.
virtual ~DataSpace() H5_OVERRIDE;
virtual ~DataSpace() override;

#ifndef DOXYGEN_SHOULD_SKIP_THIS

protected:
// Sets the dataspace id.
virtual void p_setId(const hid_t new_id) H5_OVERRIDE;
virtual void p_setId(const hid_t new_id) override;

#endif // DOXYGEN_SHOULD_SKIP_THIS

Expand Down
Loading

0 comments on commit fd01486

Please sign in to comment.