HEBench
hebench::TestHarness::LogisticRegression::DataLoader Class Reference

#include <hebench_logreg.h>

Inheritance diagram for hebench::TestHarness::LogisticRegression::DataLoader:
Collaboration diagram for hebench::TestHarness::LogisticRegression::DataLoader:

Public Types

enum class  PolynomialDegree { None , PD3 , PD5 , PD7 }
 
typedef std::shared_ptr< DataLoaderPtr
 
- Public Types inherited from hebench::TestHarness::PartialDataLoader
typedef std::shared_ptr< PartialDataLoaderPtr
 
- Public Types inherited from hebench::TestHarness::IDataLoader
template<typename T >
using unique_ptr_custom_deleter = hebench::TestHarness::unique_ptr_custom_deleter< T >
 
typedef std::shared_ptr< ResultDataResultDataPtr
 
typedef std::shared_ptr< IDataLoaderPtr
 

Public Member Functions

 ~DataLoader () override
 
- Public Member Functions inherited from hebench::TestHarness::DataLoaderCompute
 ~DataLoaderCompute () override
 
ResultDataPtr getResultFor (const std::uint64_t *param_data_pack_indices) override
 getResultFor More...
 
- Public Member Functions inherited from hebench::TestHarness::PartialDataLoader
 ~PartialDataLoader () override
 
std::uint64_t getParameterCount () const override
 Number of parameter components (operands) for the represented operation. More...
 
const hebench::APIBridge::DataPackgetParameterData (std::uint64_t param_position) const override
 Data pack for specified operation parameter (operand). More...
 
std::uint64_t getResultCount () const override
 Number of components in a result for the represented operation. More...
 
const hebench::APIBridge::DataPackgetResultData (std::uint64_t param_position) const override
 Data pack corresponding to the specified component of the result. More...
 
ResultDataPtr getResultFor (const std::uint64_t *param_data_pack_indices) override
 getResultFor More...
 
std::uint64_t getResultIndex (const std::uint64_t *param_data_pack_indices) const override
 Computes the index of the result NativeDataBuffer given the indices of the input data. More...
 
std::uint64_t getTotalDataLoaded () const override
 Total data loaded by this loader in bytes. More...
 
bool hasResults () const
 Retrieves whether buffers to contain output data have been allocated or not. More...
 
bool isInitialized () const
 
hebench::APIBridge::DataType getDataType () const
 
- Public Member Functions inherited from hebench::TestHarness::IDataLoader
virtual ~IDataLoader ()
 

Static Public Member Functions

static DataLoader::Ptr create (PolynomialDegree polynomial_degree, std::uint64_t vector_size, std::uint64_t batch_size_input, hebench::APIBridge::DataType data_type)
 
static DataLoader::Ptr create (PolynomialDegree polynomial_degree, std::uint64_t vector_size, std::uint64_t batch_size_input, hebench::APIBridge::DataType data_type, const std::string &dataset_filename)
 
- Static Public Member Functions inherited from hebench::TestHarness::IDataLoader
static std::size_t sizeOf (hebench::APIBridge::DataType data_type)
 
static unique_ptr_custom_deleter< hebench::APIBridge::DataPackCollectioncreateDataPackCollection (std::uint64_t data_pack_count)
 Creates shallow packed data that self cleans up. More...
 
static unique_ptr_custom_deleter< hebench::APIBridge::DataPackcreateDataPack (std::uint64_t buffer_count, std::uint64_t param_position)
 Creates shallow data pack that self cleans up. More...
 
static unique_ptr_custom_deleter< hebench::APIBridge::NativeDataBuffercreateDataBuffer (std::uint64_t size, std::int64_t tag)
 

Static Public Attributes

static constexpr std::size_t Index_W = 0
 
static constexpr std::size_t Index_b = 1
 
static constexpr std::size_t Index_X = 2
 

Protected Member Functions

void computeResult (std::vector< hebench::APIBridge::NativeDataBuffer * > &result, const std::uint64_t *param_data_pack_indices, hebench::APIBridge::DataType data_type) override
 Computes result of the operation on the input data given the of the input sample. More...
 
- Protected Member Functions inherited from hebench::TestHarness::DataLoaderCompute
 DataLoaderCompute ()
 
- Protected Member Functions inherited from hebench::TestHarness::PartialDataLoader
 PartialDataLoader ()
 
void init (hebench::APIBridge::DataType data_type, std::size_t input_dim, const std::size_t *input_sample_count_per_dim, const std::uint64_t *input_count_per_dim, std::size_t output_dim, const std::uint64_t *output_count_per_dim, bool allocate_output)
 Initializes dimensions of inputs and outputs. No allocation is performed. More...
 
void init (const std::string &filename, hebench::APIBridge::DataType data_type, std::size_t expected_input_dim, const std::size_t *max_input_sample_count_per_dim, const std::uint64_t *expected_input_count_per_dim, std::size_t expected_output_dim, const std::uint64_t *expected_output_count_per_dim)
 Loads a dataset from a file. More...
 
std::vector< std::shared_ptr< hebench::APIBridge::DataPack > > getResultTempDataPacks (std::uint64_t result_index) const
 Retrieves a pre-allocated result providing memory space to store a single operation result sample. More...
 
std::vector< std::shared_ptr< hebench::APIBridge::DataPack > > getResultTempDataPacks (const std::uint64_t *param_data_pack_indices) const
 Retrieves a pre-allocated result providing memory space to store a single operation result sample. More...
 
std::vector< std::shared_ptr< hebench::APIBridge::DataPack > > getResultTempDataPacks () const
 Retrieves a pre-allocated result providing memory space to store a single operation result sample. More...
 
- Protected Member Functions inherited from hebench::TestHarness::IDataLoader
 IDataLoader ()
 

Detailed Description

Definition at line 51 of file hebench_logreg.h.

Member Typedef Documentation

◆ Ptr

Definition at line 60 of file hebench_logreg.h.

Member Enumeration Documentation

◆ PolynomialDegree

Enumerator
None 
PD3 
PD5 
PD7 

Definition at line 61 of file hebench_logreg.h.

Constructor & Destructor Documentation

◆ ~DataLoader()

hebench::TestHarness::LogisticRegression::DataLoader::~DataLoader ( )
inlineoverride

Definition at line 83 of file hebench_logreg.h.

Member Function Documentation

◆ computeResult()

void hebench::TestHarness::LogisticRegression::DataLoader::computeResult ( std::vector< hebench::APIBridge::NativeDataBuffer * > &  result,
const std::uint64_t *  param_data_pack_indices,
hebench::APIBridge::DataType  data_type 
)
overrideprotectedvirtual

Computes result of the operation on the input data given the of the input sample.

Parameters
resultVector where to store the result. Vector comes pre-initialized. This method's task is to fill up the data buffers with the result values.
[in]param_data_pack_indicesFor each operation parameter, this array indicates the sample index to use for the operation. Must contain, at least, getParameterCount() elements.
[in]data_typeData type of the data pointed by the inputs and result.

Implements hebench::TestHarness::DataLoaderCompute.

Definition at line 434 of file hebench_logreg.cpp.

◆ create() [1/2]

DataLoader::Ptr hebench::TestHarness::LogisticRegression::DataLoader::create ( PolynomialDegree  polynomial_degree,
std::uint64_t  vector_size,
std::uint64_t  batch_size_input,
hebench::APIBridge::DataType  data_type 
)
static

Definition at line 294 of file hebench_logreg.cpp.

◆ create() [2/2]

DataLoader::Ptr hebench::TestHarness::LogisticRegression::DataLoader::create ( PolynomialDegree  polynomial_degree,
std::uint64_t  vector_size,
std::uint64_t  batch_size_input,
hebench::APIBridge::DataType  data_type,
const std::string &  dataset_filename 
)
static

Definition at line 304 of file hebench_logreg.cpp.

Member Data Documentation

◆ Index_b

constexpr std::size_t hebench::TestHarness::LogisticRegression::DataLoader::Index_b = 1
staticconstexpr

Definition at line 70 of file hebench_logreg.h.

◆ Index_W

constexpr std::size_t hebench::TestHarness::LogisticRegression::DataLoader::Index_W = 0
staticconstexpr

Definition at line 69 of file hebench_logreg.h.

◆ Index_X

constexpr std::size_t hebench::TestHarness::LogisticRegression::DataLoader::Index_X = 2
staticconstexpr

Definition at line 71 of file hebench_logreg.h.


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