Skip to content

Commit

Permalink
Remove KEEP_SYNCHRONOUS task
Browse files Browse the repository at this point in the history
No longer needed, as one object in the openPMD hierarchy is no longer
represented by possibly multiple Writable objects.
  • Loading branch information
franzpoeschel committed Jul 24, 2023
1 parent 86d478e commit 60b063f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 89 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ set(CORE_SOURCE
src/helper/list_series.cpp)
set(IO_SOURCE
src/IO/AbstractIOHandler.cpp
src/IO/AbstractIOHandlerImpl.cpp
src/IO/AbstractIOHandlerHelper.cpp
src/IO/DummyIOHandler.cpp
src/IO/IOTask.cpp
Expand Down
14 changes: 0 additions & 14 deletions include/openPMD/IO/AbstractIOHandlerImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,6 @@ class AbstractIOHandlerImpl
deref_dynamic_cast<Parameter<O::AVAILABLE_CHUNKS> >(
i.parameter.get()));
break;
case O::KEEP_SYNCHRONOUS:
keepSynchronous(
i.writable,
deref_dynamic_cast<Parameter<O::KEEP_SYNCHRONOUS> >(
i.parameter.get()));
break;
case O::DEREGISTER:
deregister(
i.writable,
Expand Down Expand Up @@ -564,14 +558,6 @@ class AbstractIOHandlerImpl
virtual void
listAttributes(Writable *, Parameter<Operation::LIST_ATTS> &) = 0;

/** Treat the current Writable as equivalent to that in the parameter object
*
* Using the default implementation (which copies the abstractFilePath
* into the current writable) should be enough for all backends.
*/
void
keepSynchronous(Writable *, Parameter<Operation::KEEP_SYNCHRONOUS> param);

/** Notify the backend that the Writable has been / will be deallocated.
*
* The backend should remove all references to this Writable from internal
Expand Down
46 changes: 5 additions & 41 deletions include/openPMD/IO/IOTask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,36 +47,19 @@ Writable *getWritable(Attributable *);
/** Type of IO operation between logical and persistent data.
*/
OPENPMDAPI_EXPORT_ENUM_CLASS(Operation){
CREATE_FILE,
CHECK_FILE,
OPEN_FILE,
CLOSE_FILE,
CREATE_FILE, CHECK_FILE, OPEN_FILE, CLOSE_FILE,
DELETE_FILE,

CREATE_PATH,
CLOSE_PATH,
OPEN_PATH,
DELETE_PATH,
CREATE_PATH, CLOSE_PATH, OPEN_PATH, DELETE_PATH,
LIST_PATHS,

CREATE_DATASET,
EXTEND_DATASET,
OPEN_DATASET,
DELETE_DATASET,
WRITE_DATASET,
READ_DATASET,
LIST_DATASETS,
GET_BUFFER_VIEW,
CREATE_DATASET, EXTEND_DATASET, OPEN_DATASET, DELETE_DATASET,
WRITE_DATASET, READ_DATASET, LIST_DATASETS, GET_BUFFER_VIEW,

DELETE_ATT,
WRITE_ATT,
READ_ATT,
LIST_ATTS,
DELETE_ATT, WRITE_ATT, READ_ATT, LIST_ATTS,

ADVANCE,
AVAILABLE_CHUNKS, //!< Query chunks that can be loaded in a dataset
KEEP_SYNCHRONOUS, //!< Keep two items in the object model synchronous with
//!< each other
DEREGISTER //!< Inform the backend that an object has been deleted.
}; // note: if you change the enum members here, please update
// docs/source/dev/design.rst
Expand Down Expand Up @@ -650,25 +633,6 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::AVAILABLE_CHUNKS>
std::shared_ptr<ChunkTable> chunks = std::make_shared<ChunkTable>();
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::KEEP_SYNCHRONOUS>
: public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Parameter(Parameter const &) = default;
Parameter &operator=(Parameter &&) = default;
Parameter &operator=(Parameter const &) = default;

std::unique_ptr<AbstractParameter> to_heap() && override
{
return std::make_unique<Parameter<Operation::KEEP_SYNCHRONOUS>>(
std::move(*this));
}

Writable *otherWritable;
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::DEREGISTER>
: public AbstractParameter
Expand Down
33 changes: 0 additions & 33 deletions src/IO/AbstractIOHandlerImpl.cpp

This file was deleted.

0 comments on commit 60b063f

Please sign in to comment.