Skip to content

Commit eb88851

Browse files
committed
Adapt RecordComponent implementation based on new API
1 parent 722a6a4 commit eb88851

File tree

5 files changed

+83
-306
lines changed

5 files changed

+83
-306
lines changed

include/openPMD/RecordComponent.hpp

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ class RecordComponent : public BaseRecordComponent
250250
template <typename T>
251251
std::shared_ptr<T> loadChunk(Offset = {0u}, Extent = {-1u});
252252

253-
using shared_ptr_dataset_types = auxiliary::detail::
254-
map_variant<auxiliary::detail::as_shared_pointer, dataset_types>::type;
253+
using shared_ptr_dataset_types =
254+
auxiliary::detail::shared_ptr_dataset_types;
255255

256256
/** std::variant-based version of allocating loadChunk<T>(Offset, Extent)
257257
*
@@ -289,25 +289,6 @@ class RecordComponent : public BaseRecordComponent
289289
template <typename T>
290290
void loadChunk(std::shared_ptr<T> data, Offset offset, Extent extent);
291291

292-
/** Load a chunk of data into pre-allocated memory, array version.
293-
*
294-
* @param data Preallocated, contiguous buffer, large enough to load the
295-
* the requested data into it.
296-
* The shared pointer must own and manage the buffer.
297-
* Optimizations might be implemented based on this
298-
* assumption (e.g. skipping the operation if the backend
299-
* is the unique owner).
300-
* The array-based overload helps avoid having to manually
301-
* specify the delete[] destructor (C++17 feature).
302-
* @param offset Offset within the dataset. Set to {0u} for full selection.
303-
* @param extent Extent within the dataset, counted from the offset.
304-
* Set to {-1u} for full selection.
305-
* If offset is non-zero and extent is {-1u} the leftover
306-
* extent in the record component will be selected.
307-
*/
308-
template <typename T>
309-
void loadChunk(std::shared_ptr<T[]> data, Offset offset, Extent extent);
310-
311292
/** Load a chunk of data into pre-allocated memory, raw pointer version.
312293
*
313294
* @param data Preallocated, contiguous buffer, large enough to load the
@@ -347,18 +328,6 @@ class RecordComponent : public BaseRecordComponent
347328
template <typename T>
348329
void storeChunk(std::shared_ptr<T> data, Offset offset, Extent extent);
349330

350-
/** Store a chunk of data from a chunk of memory, array version.
351-
*
352-
* @param data Preallocated, contiguous buffer, large enough to read the
353-
* the specified data from it.
354-
* The array-based overload helps avoid having to manually
355-
* specify the delete[] destructor (C++17 feature).
356-
* @param offset Offset within the dataset.
357-
* @param extent Extent within the dataset, counted from the offset.
358-
*/
359-
template <typename T>
360-
void storeChunk(std::shared_ptr<T[]> data, Offset offset, Extent extent);
361-
362331
/** Store a chunk of data from a chunk of memory, unique pointer version.
363332
*
364333
* @param data Preallocated, contiguous buffer, large enough to read the
@@ -520,9 +489,6 @@ class RecordComponent : public BaseRecordComponent
520489
*/
521490
RecordComponent &makeEmpty(Dataset d);
522491

523-
void storeChunk(
524-
auxiliary::WriteBuffer buffer, Datatype datatype, Offset o, Extent e);
525-
526492
void storeChunk_impl(
527493
auxiliary::WriteBuffer buffer,
528494
Datatype datatype,

0 commit comments

Comments
 (0)