Compute Library
 22.11
JoinDataset< T, U > Class Template Reference

Implementation of a dataset representing the concatenation of the input datasets. More...

#include <JoinDataset.h>

Collaboration diagram for JoinDataset< T, U >:
[legend]

Data Structures

struct  iterator
 Iterator for the dataset. More...
 

Public Types

using type = typename T_noref::type
 Type of the dataset. More...
 

Public Member Functions

 JoinDataset (T &&dataset1, U &&dataset2)
 Construct dataset from the given datasets. More...
 
 JoinDataset (JoinDataset &&)=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 Dataset
 Dataset (Dataset &&)=default
 Allow instances of this class to be move constructed. More...
 

Detailed Description

template<typename T, typename U>
class arm_compute::test::framework::dataset::JoinDataset< T, U >

Implementation of a dataset representing the concatenation of the input datasets.

For example, for the inputs {1, 2} and {3, 4} this dataset virtually represents the values {1, 2, 3, 4}.

Definition at line 47 of file JoinDataset.h.

Member Typedef Documentation

◆ type

using type = typename T_noref::type

Type of the dataset.

Definition at line 71 of file JoinDataset.h.

Constructor & Destructor Documentation

◆ JoinDataset() [1/2]

JoinDataset ( T &&  dataset1,
U &&  dataset2 
)
inline

Construct dataset from the given datasets.

Parameters
[in]dataset1First dataset.
[in]dataset2Second dataset.

Definition at line 61 of file JoinDataset.h.

62  : _dataset1{ std::forward<T>(dataset1) },
63  _dataset2{ std::forward<U>(dataset2) }
64  {
65  }

◆ JoinDataset() [2/2]

JoinDataset ( JoinDataset< T, U > &&  )
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 133 of file JoinDataset.h.

References JoinDataset< T, U >::iterator::iterator().

134  {
135  return iterator(&_dataset1, &_dataset2);
136  }

◆ size()

int size ( ) const
inline

Size of the dataset.

Returns
Number of values in the dataset.

Definition at line 142 of file JoinDataset.h.

References arm_compute::utils::cast::U.

143  {
144  return _dataset1.size() + _dataset2.size();
145  }

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