HEBench
hebench_dataset_loader_functional_test.h File Reference
#include "hebench_dataset_loader.h"
#include <cstdlib>
#include <cstring>
#include <filesystem>
#include <iostream>
#include <map>
#include <stdexcept>
Include dependency graph for hebench_dataset_loader_functional_test.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  DataType {
  i32 , i64 , f32 , f64 ,
  data_fail
}
 

Functions

void signal_error (const char *msg, bool usage=false)
 
std::uint8_t get_type_from_data (std::string)
 
void load_from_csv (std::string data, std::filesystem::path file_path, std::uint64_t max_loaded_size)
 

Variables

constexpr std::uint8_t help_arg = 1
 
constexpr const char * help_msg
 
constexpr const char * check_usage
 
constexpr const char * help_cstr_short = "-h"
 
constexpr const char * help_cstr_long = "--help"
 
constexpr std::uint8_t file_path_arg = 1
 
constexpr std::uint8_t type_arg = 2
 
constexpr std::uint8_t max_loaded_size_arg = 3
 
constexpr std::uint8_t max_args_allowed = 4
 
constexpr std::uint8_t min_args_allowed = 2
 

Enumeration Type Documentation

◆ DataType

enum DataType
Enumerator
i32 
i64 
f32 
f64 
data_fail 

Definition at line 15 of file hebench_dataset_loader_functional_test.h.

Function Documentation

◆ get_type_from_data()

std::uint8_t get_type_from_data ( std::string  data)

Definition at line 19 of file hebench_dataset_loader_functional_test.cpp.

◆ load_from_csv()

void load_from_csv ( std::string  data,
std::filesystem::path  file_path,
std::uint64_t  max_loaded_size 
)

Definition at line 32 of file hebench_dataset_loader_functional_test.cpp.

◆ signal_error()

void signal_error ( const char *  msg,
bool  usage = false 
)

Definition at line 8 of file hebench_dataset_loader_functional_test.cpp.

Variable Documentation

◆ check_usage

constexpr const char* check_usage
constexpr
Initial value:
= "Please check the correct usage by typing \"data_loader -h\" or"
" \"data_loader --help\"."

Definition at line 30 of file hebench_dataset_loader_functional_test.h.

◆ file_path_arg

constexpr std::uint8_t file_path_arg = 1
constexpr

Definition at line 35 of file hebench_dataset_loader_functional_test.h.

◆ help_arg

constexpr std::uint8_t help_arg = 1
constexpr

Definition at line 24 of file hebench_dataset_loader_functional_test.h.

◆ help_cstr_long

constexpr const char* help_cstr_long = "--help"
constexpr

Definition at line 33 of file hebench_dataset_loader_functional_test.h.

◆ help_cstr_short

constexpr const char* help_cstr_short = "-h"
constexpr

Definition at line 32 of file hebench_dataset_loader_functional_test.h.

◆ help_msg

constexpr const char* help_msg
constexpr
Initial value:
= "NAME\n\tdata_loader - launches the data loader module.\n\n"
"SYNOPSYS\n\tdata_loader [OPTION] [FILE] [DATA_TYPE] [MAX_LOAD]\n\n"
"DESCRIPTION\n\tIs a launcher app to test the data loader module.\n"
"\tWith no MAX_LOAD, it will be set to 0.\n\n"
"\t-h, --help displays help mesage and exits"

Definition at line 25 of file hebench_dataset_loader_functional_test.h.

◆ max_args_allowed

constexpr std::uint8_t max_args_allowed = 4
constexpr

Definition at line 39 of file hebench_dataset_loader_functional_test.h.

◆ max_loaded_size_arg

constexpr std::uint8_t max_loaded_size_arg = 3
constexpr

Definition at line 37 of file hebench_dataset_loader_functional_test.h.

◆ min_args_allowed

constexpr std::uint8_t min_args_allowed = 2
constexpr

Definition at line 40 of file hebench_dataset_loader_functional_test.h.

◆ type_arg

constexpr std::uint8_t type_arg = 2
constexpr

Definition at line 36 of file hebench_dataset_loader_functional_test.h.