ReUseX  0.0.1
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
Dataset.hpp
Go to the documentation of this file.
1#pragma once
5
7/* TensorRTDataset is a dataset class that manages TensorRTData objects. It
8 * inherits from IDataset and implements the get and save methods to handle
9 * TensorRTData instances. This class allows for efficient storage and retrieval
10 * of data in a format optimized for TensorRT operations. */
11class TensorRTDataset : public IDataset {
12 public:
14
15 /* The get method retrieves a Pair of TensorRTData objects from the dataset
16 * based on the provided index. It overrides the virtual method from the
17 * IDataset interface to return data in the specific format used by TensorRT.
18 * @param index The index of the data pair to retrieve.
19 * @return A Pair containing the input and output TensorRTData objects. */
20 IDataset::Pair get(const std::size_t index) const override;
21
22 /* The save method stores a Pair of TensorRTData objects in the dataset. It
23 * overrides the virtual method from the IDataset interface to handle data in
24 * the specific format used by TensorRT. This method allows for efficient
25 * saving of data pairs that can be later retrieved using the get method.
26 * @param data A span containing the Pair of TensorRTData objects to save.
27 * @return A boolean value indicating whether the save operation was
28 * successful. */
29 bool save(const std::span<Pair> &data) override;
30};
31} // namespace ReUseX::vision::tensor_rt
std::pair< std::unique_ptr< IData >, size_t > Pair
Definition IDataset.hpp:41
IDataset(std::shared_ptr< io::RTABMapDatabase > database)
IDataset::Pair get(const std::size_t index) const override
bool save(const std::span< Pair > &data) override
IDataset(std::shared_ptr< io::RTABMapDatabase > database)