Compute Library
 22.11
ContainerDataset< T > Class Template Reference

Implementation of a dataset created from a container. More...

#include <ContainerDataset.h>

Collaboration diagram for ContainerDataset< T >:
[legend]

Data Structures

struct  iterator
 Iterator for the dataset. More...
 

Public Types

using type = std::tuple< container_value_type >
 Type of the dataset. More...
 

Public Member Functions

 ContainerDataset (std::string name, T &&container)
 Construct dataset with given name and values from the container. More...
 
 ContainerDataset (const ContainerDataset &)=default
 Allow instances of this class to be copy constructed. More...
 
 ContainerDataset (ContainerDataset &&)=default
 Allow instances of this class to be move constructed. More...
 
iterator begin () const
 Iterator pointing at the begin of the dataset. More...
 
int size () const
 Size of the dataset. More...
 
- Public Member Functions inherited from NamedDataset
 NamedDataset (NamedDataset &&)=default
 Allow instances of this class to be move constructed. More...
 
std::string name () const
 Return name of the dataset. More...
 
- Public Member Functions inherited from Dataset
 Dataset (Dataset &&)=default
 Allow instances of this class to be move constructed. More...
 

Detailed Description

template<typename T>
class arm_compute::test::framework::dataset::ContainerDataset< T >

Implementation of a dataset created from a container.

Definition at line 58 of file ContainerDataset.h.

Member Typedef Documentation

◆ type

using type = std::tuple<container_value_type>

Type of the dataset.

Definition at line 81 of file ContainerDataset.h.

Constructor & Destructor Documentation

◆ ContainerDataset() [1/3]

ContainerDataset ( std::string  name,
T &&  container 
)
inline

Construct dataset with given name and values from the container.

Parameters
[in]nameDescription of the values.
[in]containerValues for the dataset.

Definition at line 70 of file ContainerDataset.h.

71  : NamedDataset{ std::move(name) }, _container(std::forward<T>(container))
72  {
73  }
std::string name() const
Return name of the dataset.
Definition: Dataset.h:79
NamedDataset(NamedDataset &&)=default
Allow instances of this class to be move constructed.

◆ ContainerDataset() [2/3]

ContainerDataset ( const ContainerDataset< T > &  )
default

Allow instances of this class to be copy constructed.

◆ ContainerDataset() [3/3]

ContainerDataset ( ContainerDataset< T > &&  )
default

Allow instances of this class to be move constructed.

Member Function Documentation

◆ begin()

iterator begin ( ) const
inline

Iterator pointing at the begin of the dataset.

Returns
Iterator for the dataset.

Definition at line 134 of file ContainerDataset.h.

References name.

135  {
136  return iterator(name(), _container.cbegin());
137  }
std::string name() const
Return name of the dataset.
Definition: Dataset.h:79

◆ size()

int size ( ) const
inline

Size of the dataset.

Returns
Number of values in the dataset.

Definition at line 143 of file ContainerDataset.h.

144  {
145  return _container.size();
146  }

The documentation for this class was generated from the following file: