Compute Library
 22.11
InitializerListDataset< T > Class Template Referencefinal

Implementation of a dataset created from an initializer list. More...

#include <InitializerListDataset.h>

Collaboration diagram for InitializerListDataset< 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

 InitializerListDataset (std::string name, std::initializer_list< T > &&list)
 Construct dataset with given name and values from the container. More...
 
 InitializerListDataset (InitializerListDataset &&)=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::InitializerListDataset< T >

Implementation of a dataset created from an initializer list.

Definition at line 46 of file InitializerListDataset.h.

Member Typedef Documentation

◆ type

using type = std::tuple<T>

Type of the dataset.

Definition at line 66 of file InitializerListDataset.h.

Constructor & Destructor Documentation

◆ InitializerListDataset() [1/2]

InitializerListDataset ( std::string  name,
std::initializer_list< T > &&  list 
)
inline

Construct dataset with given name and values from the container.

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

Definition at line 57 of file InitializerListDataset.h.

References arm_compute::test::validation::forward.

58  : NamedDataset{ std::move(name) }, _data(std::forward<std::initializer_list<T>>(list))
59  {
60  }
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.

◆ InitializerListDataset() [2/2]

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 118 of file InitializerListDataset.h.

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

119  {
120  return iterator(name(), _data.cbegin());
121  }
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 127 of file InitializerListDataset.h.

128  {
129  return _data.size();
130  }

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