ComPPare 1.0.0
Loading...
Searching...
No Matches
comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup > Class Template Referencefinal

NVBench plugin for the ComPPare framework. More...

#include <nvbench.hpp>

Inheritance diagram for comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >:
[legend]
Collaboration diagram for comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >:
[legend]

Public Member Functions

 nvbenchPlugin (const nvbenchPlugin &)=delete
 
nvbenchPluginoperator= (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.
 
- Public Member Functions inherited from comppare::plugin::Plugin< InTup, OutTup >
virtual ~Plugin ()=default
 

Static Public Member Functions

static std::shared_ptr< Selfinstance ()
 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_
 

Detailed Description

template<class InTup, class OutTup>
class comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >

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.

Template Parameters
InTupThe type of the input tuple.
OutTupThe type of the output tuple.

Member Typedef Documentation

◆ Self

template<class InTup , class OutTup >
using comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >::Self = nvbenchPlugin<InTup, OutTup>
private

Constructor & Destructor Documentation

◆ nvbenchPlugin() [1/2]

template<class InTup , class OutTup >
comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >::nvbenchPlugin ( )
privatedefault

◆ nvbenchPlugin() [2/2]

template<class InTup , class OutTup >
comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >::nvbenchPlugin ( const nvbenchPlugin< InTup, OutTup > &  )
delete

Member Function Documentation

◆ initialize()

template<class InTup , class OutTup >
void comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >::initialize ( int &  argc,
char **  argv 
)
inlineoverridevirtual

Initialize the NVBench plugin.

This method initializes the NVBench plugin by calling the initialize method of the internal nvbench_manager.

Parameters
argcThe number of command-line arguments.
argvThe command-line arguments.

Reimplemented from comppare::plugin::Plugin< InTup, OutTup >.

◆ instance()

template<class InTup , class OutTup >
static std::shared_ptr< Self > comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >::instance ( )
inlinestatic

Get the singleton instance of the nvbenchPlugin.

Returns
A shared pointer to the singleton instance.

This method ensures that only one instance of the nvbenchPlugin exists throughout the program. It returns a shared pointer to the instance.

◆ operator=()

template<class InTup , class OutTup >
nvbenchPlugin & comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >::operator= ( const nvbenchPlugin< InTup, OutTup > &  )
delete

◆ register_impl()

template<class InTup , class OutTup >
template<class Func >
nvbench::benchmark_base & comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >::register_impl ( const std::string &  name,
Func &&  user_fn,
const InTup &  inputs,
OutTup &  outs 
)
inline

Register an implementation with the NVBench plugin.

Template Parameters
FuncThe type of the user-provided function.
Parameters
nameThe name of the implementation.
user_fnThe function/implementation to register.
inputsA const reference to the input tuple.
outsA reference to the output tuple.
Returns
A pointer to the registered benchmark.

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.

◆ run()

template<class InTup , class OutTup >
void comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >::run ( )
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 >.

Member Data Documentation

◆ nb_

template<class InTup , class OutTup >
comppare::plugin::nvbenchplugin::nvbench_manager comppare::plugin::nvbenchplugin::nvbenchPlugin< InTup, OutTup >::nb_
private

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