ALP User Documentation
0.8.preview
Algebraic Programming User Documentation
|
A class that follows the API of the grb::Launcher, but instead of launching the given ALP program once, it launches it multiple times while benchmarking its execution times. More...
Public Member Functions | |
Benchmarker (const size_t process_id=0, const size_t nprocs=1, const std::string hostname="localhost", const std::string port="0") | |
Constructs an instance of the benchmarker class. More... | |
template<typename T , typename U > | |
RC | exec (void(*alp_program)(const T &, U &), const T &data_in, U &data_out, const size_t inner, const size_t outer, const bool broadcast=false) const |
Benchmarks a given ALP program. More... | |
template<typename U > | |
RC | exec (void(*alp_program)(const void *, const size_t, U &), const void *data_in, const size_t in_size, U &data_out, const size_t inner, const size_t outer, const bool broadcast=false) const |
Benchmarks a given ALP program. More... | |
Static Public Member Functions | |
static RC | finalize () |
Releases all ALP resources. More... | |
A class that follows the API of the grb::Launcher, but instead of launching the given ALP program once, it launches it multiple times while benchmarking its execution times.
|
inline |
Constructs an instance of the benchmarker class.
[in] | process_id | A unique ID for the calling user process. |
[in] | nprocs | The total number of user processes participating in the benchmark. The given process_id must be strictly smaller than this given value. |
[in] | hostname | The hostname where one of the user processes participating in the benchmark resides. |
[in] | port | A free TCP/IP port at the host corresponding to the given hostname. |
The hostname and port arguments are unused if nprocs equals one.
All arguments are optional– their defaults are:
This constructor may throw the same errors as grb::Launcher.
|
inline |
Benchmarks a given ALP program.
This variant applies to typed ALP programs.
T | Input type of the given user program. |
U | Output type of the given user program. |
[in] | alp_program | The ALP program to be benchmarked. |
[in] | data_in | Input data. |
[out] | data_out | Output data. |
[in] | inner | Number of inner repetitions of the benchmark. |
[in] | outer | Number of outer repetitions of the benchmark. |
[in] | broadcast | An optional argument that dictates whether the data_in argument should be broadcast across all user processes participating in the benchmark, prior to each invocation of alp_program. |
The default value of broadcast is false
.
false
but T is not default-constructible.
|
inline |
Benchmarks a given ALP program.
This variant applies to untyped ALP programs.
U | Output type of the given user program. |
[in] | alp_program | The user program to be benchmarked. |
[in] | data_in | Input data as a raw data blob. |
[in] | in_size | The size, in bytes, of the input data. |
[out] | data_out | Output data. |
[in] | inner | Number of inner repetitions of the benchmark. |
[in] | outer | Number of outer repetitions of the benchmark. |
[in] | broadcast | An optional argument that dictates whether the data_in argument should be broadcast across all user processes participating in the benchmark, prior to each invocation of alp_program. |
The default value of broadcast is false
.
nullptr
.
|
inlinestatic |
Releases all ALP resources.
Calling this function is equivalent to calling grb::Launcher::finalize.