HEBench
hebench::TestHarness::SimpleSetIntersection Namespace Reference

Namespaces

 Latency
 
 Offline
 

Classes

class  BenchmarkDescriptorCategory
 
class  DataLoader
 
class  DataGeneratorHelper
 Static helper class to generate vector data for all supported data types. More...
 

Functions

template<typename T >
std::enable_if< std::is_integral< T >::value||std::is_floating_point< T >::value, std::vector< std::pair< bool, std::uint64_t > > >::type almostEqualSet (const T *X, const T *Y, std::uint64_t n, std::uint64_t m, std::uint64_t k, double pct=0.05)
 Finds whether values in two arrays are within a certain percentage of each other. More...
 
template<typename T >
std::enable_if< std::is_integral< T >::value||std::is_floating_point< T >::value, bool >::type isMemberOf (const T *dataset, const T *value, std::size_t n, std::size_t k, double pct=0.05)
 Finds whether values in two arrays are within a certain percentage of each other. More...
 
bool validateResult (IDataLoader::Ptr dataset, const std::uint64_t *param_data_pack_indices, const std::vector< hebench::APIBridge::NativeDataBuffer * > &p_outputs, std::uint64_t k_count, hebench::APIBridge::DataType data_type)
 

Function Documentation

◆ almostEqualSet()

template<typename T >
std::enable_if< std::is_integral< T >::value||std::is_floating_point< T >::value, std::vector< std::pair< bool, std::uint64_t > > >::type hebench::TestHarness::SimpleSetIntersection::almostEqualSet ( const T *  X,
const T *  Y,
std::uint64_t  n,
std::uint64_t  m,
std::uint64_t  k,
double  pct = 0.05 
)

Finds whether values in two arrays are within a certain percentage of each other.

Parameters
[in]aPointer to start of first array to compare.
[in]bPointer to start of second array to compare.
[in]element_countNumber of elements in array a.
[in]pctPer-one for comparison: this is percent divided by 100.
Returns
A vector of uint64 where each element in this vector is the index of the values in a and b that were not within pct * 100 of each other. The return vector is empty if all values were within range of each other.

Parameter a must hold, at least, count elements.

Definition at line 185 of file hebench_simple_set_intersection.h.

◆ isMemberOf()

template<typename T >
std::enable_if< std::is_integral< T >::value||std::is_floating_point< T >::value, bool >::type hebench::TestHarness::SimpleSetIntersection::isMemberOf ( const T *  dataset,
const T *  value,
std::size_t  n,
std::size_t  k,
double  pct = 0.05 
)

Finds whether values in two arrays are within a certain percentage of each other.

Parameters
[in]aPointer to start of the array.
[in]elementvalue to be found in a.
[in]element_countNumber of elements in array a.
[in]item_countNumber of items per element in array a.
[in]pctPer-one for comparison: this is percent divided by 100.
Returns
Returns a boolean true if element is a member of a, false otherwise.

Parameter a must hold, at least, count elements.

Definition at line 160 of file hebench_simple_set_intersection.h.

◆ validateResult()

bool hebench::TestHarness::SimpleSetIntersection::validateResult ( IDataLoader::Ptr  dataset,
const std::uint64_t *  param_data_pack_indices,
const std::vector< hebench::APIBridge::NativeDataBuffer * > &  p_outputs,
std::uint64_t  k_count,
hebench::APIBridge::DataType  data_type 
)

Definition at line 443 of file hebench_simple_set_intersection.cpp.