ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
Toggle main menu visibility
Loading...
Searching...
No Matches
Dataset.hpp
Go to the documentation of this file.
1
#pragma once
2
#include "reusex/vision/IData.hpp"
3
#include "reusex/vision/IDataset.hpp"
4
#include "reusex/vision/tensor_rt/Data.hpp"
5
6
namespace
reusex::vision::tensor_rt
{
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. */
11
class
TensorRTDataset
:
public
IDataset
{
12
public
:
13
using
IDataset::IDataset
;
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
private
:
32
bool
class_map_saved_ =
false
;
33
};
34
}
// namespace reusex::vision::tensor_rt
reusex::vision::IDataset::IDataset
IDataset(std::shared_ptr< ProjectDB > database)
reusex::vision::IDataset::Pair
std::pair< std::unique_ptr< IData >, size_t > Pair
Definition
IDataset.hpp:43
reusex::vision::tensor_rt::TensorRTDataset
Definition
Dataset.hpp:11
reusex::vision::tensor_rt::TensorRTDataset::save
bool save(const std::span< Pair > &data) override
reusex::vision::tensor_rt::TensorRTDataset::IDataset
IDataset(std::shared_ptr< ProjectDB > database)
reusex::vision::tensor_rt::TensorRTDataset::get
IDataset::Pair get(const std::size_t index) const override
reusex::vision::tensor_rt
Definition
Backend.hpp:6
libs
reusex
include
vision
tensor_rt
Dataset.hpp
Generated by
1.17.0