ComPPare 1.0.0
|
NVBench plugin for the ComPPare framework. More...
#include <nvbench.hpp>
Public Member Functions | |
nvbenchPlugin (const nvbenchPlugin &)=delete | |
nvbenchPlugin & | operator= (const nvbenchPlugin &)=delete |
template<class Func > | |
nvbench::benchmark_base & | register_impl (const std::string &name, Func &&user_fn, const InTup &inputs, OutTup &outs) |
Register an implementation with the NVBench plugin. | |
void | initialize (int &argc, char **argv) override |
Initialize the NVBench plugin. | |
void | run () override |
Run the registered benchmarks. | |
![]() | |
virtual | ~Plugin ()=default |
Static Public Member Functions | |
static std::shared_ptr< Self > | instance () |
Get the singleton instance of the nvbenchPlugin. | |
Private Types | |
using | Self = nvbenchPlugin< InTup, OutTup > |
Private Member Functions | |
nvbenchPlugin ()=default | |
Private Attributes | |
comppare::plugin::nvbenchplugin::nvbench_manager | nb_ |
NVBench plugin for the ComPPare framework.
This plugin integrates the NVBench library into the ComPPare framework. It provides methods to register implementations, initialize the benchmark library, and run the benchmarks. The plugin is designed to work with input and output tuples for flexible benchmarking of various functions.
InTup | The type of the input tuple. |
OutTup | The type of the output tuple. |
|
private |
|
privatedefault |
|
delete |
|
inlineoverridevirtual |
Initialize the NVBench plugin.
This method initializes the NVBench plugin by calling the initialize
method of the internal nvbench_manager.
argc | The number of command-line arguments. |
argv | The command-line arguments. |
Reimplemented from comppare::plugin::Plugin< InTup, OutTup >.
|
inlinestatic |
Get the singleton instance of the nvbenchPlugin.
This method ensures that only one instance of the nvbenchPlugin exists throughout the program. It returns a shared pointer to the instance.
|
delete |
|
inline |
Register an implementation with the NVBench plugin.
Func | The type of the user-provided function. |
name | The name of the implementation. |
user_fn | The function/implementation to register. |
inputs | A const reference to the input tuple. |
outs | A reference to the output tuple. |
This method passes the user-provided function and its arguments to the internal nvbench_manager for registration. It uses std::apply
to unpack the input and output tuples and forward them to the manager's add_nvbench
method.
|
inlineoverridevirtual |
Run the registered benchmarks.
This method runs the benchmarks by calling the run
method of the internal nvbench_manager.
Reimplemented from comppare::plugin::Plugin< InTup, OutTup >.
|
private |