Static helper class to generate vector data for all supported data types.
More...
#include <datagen_helper.h>
|
static void | generateRandomVectorU (hebench::APIBridge::DataType data_type, void *result, std::uint64_t elem_count, double min_val, double max_val) |
| Generates uniform random data of the specified type. More...
|
|
static void | generateRandomVectorN (hebench::APIBridge::DataType data_type, void *result, std::uint64_t elem_count, double mean, double stddev) |
| Generates normally distributed random data of the specified type. More...
|
|
static std::uint64_t | generateRandomIntU (std::uint64_t min_val, std::uint64_t max_val) |
|
static std::vector< std::uint64_t > | generateRandomIntersectionIndicesU (std::uint64_t elem_count, std::uint64_t indices_count=0) |
| Generates uniform random amount of indices. More...
|
|
Static helper class to generate vector data for all supported data types.
This class uses the default seed for generation to ensure repeatable results as long as parameters for the tests are the same.
Definition at line 61 of file datagen_helper.h.
◆ ~DataGeneratorHelper()
virtual hebench::TestHarness::DataGeneratorHelper::~DataGeneratorHelper |
( |
| ) |
|
|
virtualdefault |
◆ DataGeneratorHelper()
hebench::TestHarness::DataGeneratorHelper::DataGeneratorHelper |
( |
| ) |
|
|
protecteddefault |
◆ generateRandomIntersectionIndicesU()
std::vector< std::uint64_t > hebench::TestHarness::DataGeneratorHelper::generateRandomIntersectionIndicesU |
( |
std::uint64_t |
elem_count, |
|
|
std::uint64_t |
indices_count = 0 |
|
) |
| |
|
static |
Generates uniform random amount of indices.
- Parameters
-
[in] | elem_count | Number of elements in the set. |
[in] | indices_count | Number of pre-defined indices to be generated. |
- Returns
- A vector holding the indices.
Definition at line 161 of file datagen_helper.cpp.
◆ generateRandomIntU()
std::uint64_t hebench::TestHarness::DataGeneratorHelper::generateRandomIntU |
( |
std::uint64_t |
min_val, |
|
|
std::uint64_t |
max_val |
|
) |
| |
|
static |
◆ generateRandomVectorN()
void hebench::TestHarness::DataGeneratorHelper::generateRandomVectorN |
( |
hebench::APIBridge::DataType |
data_type, |
|
|
void * |
result, |
|
|
std::uint64_t |
elem_count, |
|
|
double |
mean, |
|
|
double |
stddev |
|
) |
| |
|
static |
Generates normally distributed random data of the specified type.
- Parameters
-
[in] | data_type | Data type of data to generate. |
[in] | result | Pointer to buffer containing elements of the specified type. |
[in] | elem_count | Number of elements in pointed buffer. |
[in] | min_val | Minimum value for generated elements. |
[in] | max_val | Maximum value for generated elements. |
Definition at line 123 of file datagen_helper.cpp.
◆ generateRandomVectorU()
void hebench::TestHarness::DataGeneratorHelper::generateRandomVectorU |
( |
hebench::APIBridge::DataType |
data_type, |
|
|
void * |
result, |
|
|
std::uint64_t |
elem_count, |
|
|
double |
min_val, |
|
|
double |
max_val |
|
) |
| |
|
static |
Generates uniform random data of the specified type.
- Parameters
-
[in] | data_type | Data type of data to generate. |
[in] | result | Pointer to buffer containing elements of the specified type. |
[in] | elem_count | Number of elements in pointed buffer. |
[in] | min_val | Minimum value for generated elements. |
[in] | max_val | Maximum value for generated elements. |
Definition at line 91 of file datagen_helper.cpp.
The documentation for this class was generated from the following files: