Compute Library
 22.11
SingletonDataset< T > Class Template Reference

Implementation of a dataset holding a single value. More...

#include <SingletonDataset.h>

Collaboration diagram for SingletonDataset< T >:
[legend]

Data Structures

struct  iterator
 Iterator for the dataset. More...
 

Public Types

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

Public Member Functions

 SingletonDataset (std::string name, T &&value)
 Construct dataset with given name and value. More...
 
 SingletonDataset (SingletonDataset &&)=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::SingletonDataset< T >

Implementation of a dataset holding a single value.

Definition at line 46 of file SingletonDataset.h.

Member Typedef Documentation

◆ type

using type = std::tuple<T>

Type of the dataset.

Definition at line 63 of file SingletonDataset.h.

Constructor & Destructor Documentation

◆ SingletonDataset() [1/2]

SingletonDataset ( std::string  name,
T &&  value 
)
inline

Construct dataset with given name and value.

Parameters
[in]nameDescription of the value.
[in]valueValue for the dataset.

Definition at line 54 of file SingletonDataset.h.

55  : NamedDataset{ std::move(name) }, _value{ std::forward<T>(value) }
56  {
57  }
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.

◆ SingletonDataset() [2/2]

SingletonDataset ( SingletonDataset< 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 127 of file SingletonDataset.h.

References SingletonDataset< T >::iterator::iterator(), and NamedDataset::name().

128  {
129  return iterator(name(), &_value);
130  }
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 136 of file SingletonDataset.h.

137  {
138  return 1;
139  }

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