A virtual class (with convenient static methods) to define parallel task performance models. More...
#include <ParallelModel.h>
Static Public Member Functions | |
static std::shared_ptr< ParallelModel > | AMDAHL (double alpha) |
Create an instance of an "Amdahl" parallel model. More... | |
static std::shared_ptr< ParallelModel > | CONSTANTEFFICIENCY (double efficiency) |
Create an instance of a "Constant Efficiency" parallel model. More... | |
static std::shared_ptr< ParallelModel > | CUSTOM (std::function< std::vector< double >(double, long)> lambda) |
Create an instance of a "Custom" parallel model. More... | |
Detailed Description
A virtual class (with convenient static methods) to define parallel task performance models.
Member Function Documentation
◆ AMDAHL()
|
static |
Create an instance of an "Amdahl" parallel model.
- Parameters
-
alpha the fraction (i.e., a number between 0.0 and 1.0) of the task's work that is perfectly parallelizable. Setting this value to 0 means that the task is purely sequential, and setting it to 1 means that the task is perfectly parallelizable.
- Returns
- a model instance
◆ CONSTANTEFFICIENCY()
|
static |
Create an instance of a "Constant Efficiency" parallel model.
- Parameters
-
efficiency the parallel efficiency (which does not depend on the number of threads/cores).
- Returns
- a model instance
◆ CUSTOM()
|
static |
Create an instance of a "Custom" parallel model.
- Parameters
-
lambda a function that, when given a total flop amount and a number of threads, returns a vector of per-thread work amounts
- Returns
- a model instance
The documentation for this class was generated from the following files:
- ParallelModel.h
- ParallelModel.cpp