HEBench
|
#include <hebench_dataset_loader.h>
Static Public Member Functions | |
static ExternalDataset< T > | loadFromCSV (const std::string &filename, std::uint64_t max_loaded_size=0) |
Loads a dataset from an external csv file that follows the defined structure. More... | |
Definition at line 40 of file hebench_dataset_loader.h.
|
static |
Loads a dataset from an external csv file that follows the defined structure.
[in] | filename | Name of the file to load. |
[in] | max_loaded_size | Maximum size, in bytes, allowed for the data to occupy after loading. If 0, there is no limit to how much memory the data can occupy. |
Standard | C++ exception derived from std::exception on error describing the failure. |
ExternalDataset
structure containing the data loaded where the loaded scalars are of type T
.Contents of the file loaded will be casted to the type indicated for the template parameter specification during the method call. Samples containing strings will be converted into equivalent ASCII characters and cast into template type T
.
If max_loaded_size
is not zero, then, the total number of bytes required to hold all the values loaded in the returned ExternalDataset
must be less than or equal to value of max_loaded_size
. Otherwise, an exception is thrown because the size of the dataset in the file specified after loading and converting to ExternalDataset
is larger than non-zero max_loaded_size
.
Definition at line 623 of file hebench_dataset_loader.cpp.