Compute Library
 21.02
arm_compute::test::framework::dataset Namespace Reference

Data Structures

class  CartesianProductDataset
 Implementation of a dataset representing all combinations of values of the input datasets. More...
 
class  ContainerDataset
 Implementation of a dataset created from a container. More...
 
class  Dataset
 Abstract dataset base class. More...
 
class  InitializerListDataset
 Implementation of a dataset created from an initializer list. More...
 
struct  is_container
 Base case. More...
 
struct  is_container< std::vector< V, A > >
 Vector is considered a container. More...
 
class  JoinDataset
 Implementation of a dataset representing the concatenation of the input datasets. More...
 
class  NamedDataset
 Abstract implementation of a named dataset. More...
 
class  RangeDataset
 Implementation of a dataset created from a range of values. More...
 
class  SingletonDataset
 Implementation of a dataset holding a single value. More...
 
class  ZipDataset
 Implementation of a dataset representing pairs of values of the input datasets. More...
 

Functions

template<typename T , typename U >
CartesianProductDataset< T, U > combine (T &&dataset1, U &&dataset2)
 Helper function to create a CartesianProductDataset. More...
 
template<typename T , typename U >
CartesianProductDataset< T, U > operator* (T &&dataset1, U &&dataset2)
 Helper function to create a CartesianProductDataset. More...
 
template<typename T >
std::enable_if< is_container< T >::value, ContainerDataset< T > >::type make (std::string name, T &&values)
 Helper function to create a ContainerDataset. More...
 
template<typename T >
InitializerListDataset< T > make (std::string name, std::initializer_list< T > &&list)
 Helper function to create an InitializerListDataset. More...
 
template<typename T , typename U >
JoinDataset< T, U > concat (T &&dataset1, U &&dataset2)
 Helper function to create a JoinDataset. More...
 
template<typename T >
RangeDataset< T > make (std::string name, T start, T end, T step=1)
 Helper function to create a RangeDataset. More...
 
template<typename T >
std::enable_if< !is_container< T >::value, SingletonDataset< T > >::type make (std::string name, T &&value)
 Helper function to create a SingletonDataset. More...
 
template<typename T , typename U >
ZipDataset< T, U > zip (T &&dataset1, U &&dataset2)
 Helper function to create a ZipDataset. More...
 

Function Documentation

◆ combine()

CartesianProductDataset<T, U> arm_compute::test::framework::dataset::combine ( T &&  dataset1,
U &&  dataset2 
)

Helper function to create a CartesianProductDataset.

Parameters
[in]dataset1First dataset.
[in]dataset2Second dataset.
Returns
A grid dataset.

Definition at line 180 of file CartesianProductDataset.h.

Referenced by arm_compute::test::validation::FIXTURE_DATA_TEST_CASE().

181 {
182  return CartesianProductDataset<T, U>(std::forward<T>(dataset1), std::forward<U>(dataset2));
183 }

◆ concat()

JoinDataset<T, U> arm_compute::test::framework::dataset::concat ( T &&  dataset1,
U &&  dataset2 
)

Helper function to create a JoinDataset.

Parameters
[in]dataset1First dataset.
[in]dataset2Second dataset.
Returns
A join dataset.

Definition at line 160 of file JoinDataset.h.

Referenced by GraphBuilder::add_yolo_node(), arm_compute::test::validation::combine(), arm_compute::test::validation::FIXTURE_DATA_TEST_CASE(), and arm_compute::test::validation::TEST_SUITE_END().

161 {
162  return JoinDataset<T, U>(std::forward<T>(dataset1), std::forward<U>(dataset2));
163 }

◆ make() [1/4]

InitializerListDataset<T> arm_compute::test::framework::dataset::make ( std::string  name,
std::initializer_list< T > &&  list 
)

Helper function to create an InitializerListDataset.

Parameters
[in]nameName of the dataset.
[in]listInitializer list.
Returns
An initializer list dataset.

Definition at line 144 of file InitializerListDataset.h.

145 {
146  return InitializerListDataset<T>(std::move(name), std::forward<std::initializer_list<T>>(list));
147 }
const char * name

◆ make() [2/4]

RangeDataset<T> arm_compute::test::framework::dataset::make ( std::string  name,
start,
end,
step = 1 
)

Helper function to create a RangeDataset.

Parameters
[in]nameName of the dataset.
[in]startBegin of the range.
[in]endEnd of the range.
[in]stepStep size.
Returns
A range dataset.

Definition at line 152 of file RangeDataset.h.

References arm_compute::mlgo::parser::end(), enable_tracing::start, and arm_compute::cpu::step.

153 {
154  return RangeDataset<T>(std::move(name), start, end, step);
155 }
void end(TokenStream &in, bool &valid)
Definition: MLGOParser.cpp:290
const char * name
constexpr int step
Definition: fp32.cpp:35

◆ make() [3/4]

std::enable_if< !is_container<T>::value, SingletonDataset<T > >::type arm_compute::test::framework::dataset::make ( std::string  name,
T &&  value 
)

Helper function to create a SingletonDataset.

Parameters
[in]nameName of the dataset.
[in]valueValue.
Returns
A singleton dataset.

Definition at line 153 of file SingletonDataset.h.

154 {
155  return SingletonDataset<T>(std::move(name), std::forward<T>(value));
156 }
const char * name

◆ make() [4/4]

std::enable_if<is_container<T>::value, ContainerDataset<T> >::type arm_compute::test::framework::dataset::make ( std::string  name,
T &&  values 
)

Helper function to create a ContainerDataset.

Parameters
[in]nameName of the dataset.
[in]valuesContainer.
Returns
A container dataset.

Definition at line 161 of file ContainerDataset.h.

Referenced by arm_compute::test::validation::combine(), arm_compute::test::validation::detail::configure_conv_function< NEGEMMConv2d, Tensor >(), DATA_TEST_CASE(), arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::test::validation::FIXTURE_DATA_TEST_CASE(), arm_compute::test::validation::for(), and arm_compute::test::validation::TEST_CASE().

162 {
163  return ContainerDataset<T>(std::move(name), std::forward<T>(values));
164 }
const char * name

◆ operator*()

CartesianProductDataset<T, U> arm_compute::test::framework::dataset::operator* ( T &&  dataset1,
U &&  dataset2 
)

Helper function to create a CartesianProductDataset.

Parameters
[in]dataset1First dataset.
[in]dataset2Second dataset.
Returns
A grid dataset.

Definition at line 194 of file CartesianProductDataset.h.

195 {
196  return CartesianProductDataset<T, U>(std::forward<T>(dataset1), std::forward<U>(dataset2));
197 }

◆ zip()

ZipDataset<T, U> arm_compute::test::framework::dataset::zip ( T &&  dataset1,
U &&  dataset2 
)

Helper function to create a ZipDataset.

Parameters
[in]dataset1First dataset.
[in]dataset2Second dataset.
Returns
A zip dataset.

Definition at line 149 of file ZipDataset.h.

150 {
151  return ZipDataset<T, U>(std::forward<T>(dataset1), std::forward<U>(dataset2));
152 }