5 #ifndef _HEBench_Harness_DataGenHelper_H_0596d40a3cce4b108a81595c50eb286d
6 #define _HEBench_Harness_DataGenHelper_H_0596d40a3cce4b108a81595c50eb286d
12 #include <type_traits>
14 #include "hebench/modules/logging/include/logging.h"
20 namespace TestHarness {
46 virtual void computeResult(std::vector<hebench::APIBridge::NativeDataBuffer *> &result,
47 const std::uint64_t *param_data_pack_indices,
52 std::vector<std::shared_ptr<hebench::APIBridge::DataPack>> &getLocalTempResult();
53 std::shared_ptr<std::vector<std::shared_ptr<hebench::APIBridge::DataPack>>> m_p_temp_result;
78 void *result, std::uint64_t elem_count,
79 double min_val,
double max_val);
90 void *result, std::uint64_t elem_count,
91 double mean,
double stddev);
109 T min_val, T max_val);
115 static std::mutex m_mtx_rand;
Static helper class to generate vector data for all supported data types.
static std::vector< std::uint64_t > generateRandomIntersectionIndicesU(std::uint64_t elem_count, std::uint64_t indices_count=0)
Generates uniform random amount of indices.
static std::uint64_t generateRandomIntU(std::uint64_t min_val, std::uint64_t max_val)
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.
virtual ~DataGeneratorHelper()=default
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.
DataGeneratorHelper()=default
virtual void computeResult(std::vector< hebench::APIBridge::NativeDataBuffer * > &result, const std::uint64_t *param_data_pack_indices, hebench::APIBridge::DataType data_type)=0
Computes result of the operation on the input data given the of the input sample.
ResultDataPtr getResultFor(const std::uint64_t *param_data_pack_indices) override
getResultFor
~DataLoaderCompute() override
std::shared_ptr< ResultData > ResultDataPtr
Base class for data loaders and data generators.
DataType
Defines data types for a workload.