API Reference
Runners Module
-
namespace runners
Functions
-
int Init(int argc, char **argv)
Initializes the testing environment (e.g., MPI, logging).
- Parameters:
argc – Argument count.
argv – Argument vector.
- Returns:
Exit code from RUN_ALL_TESTS or MPI error code if initialization/ finalization fails.
-
int SimpleInit(int argc, char **argv)
Initializes the testing environment only for gtest.
- Parameters:
argc – Argument count.
argv – Argument vector.
- Returns:
Exit code from RUN_ALL_TESTS.
-
class UnreadMessagesDetector : public testing::EmptyTestEventListener
- #include <runners.hpp>
GTest event listener that checks for unread MPI messages after each test.
Note
Used to detect unexpected inter-process communication leftovers.
-
class WorkerTestFailurePrinter : public testing::EmptyTestEventListener
- #include <runners.hpp>
GTest event listener that prints additional information on test failures in worker processes.
Includes MPI rank info in failure output for debugging.
-
int Init(int argc, char **argv)
Task Module
-
namespace task
Typedefs
-
using TaskMapping = std::pair<TypeOfTask, std::string>
-
using TaskMappingArray = std::array<TaskMapping, 6>
Enums
-
enum TypeOfTask
Represents the type of task (parallelization technology).
Used to select the implementation type in tests and execution logic.
Values:
-
enumerator kALL
Use all available implementations.
-
enumerator kMPI
MPI (Message Passing Interface)
-
enumerator kOMP
OpenMP (Open Multi-Processing)
-
enumerator kSEQ
Sequential implementation.
-
enumerator kSTL
Standard Thread Library (STL threads)
-
enumerator kTBB
Intel Threading Building Blocks (TBB)
-
enumerator kUnknown
Unknown task type.
-
enumerator kALL
-
enum StatusOfTask
Indicates whether a task is enabled or disabled.
Values:
Functions
-
inline std::string TypeOfTaskToString(TypeOfTask type)
-
inline std::string GetStringTaskStatus(StatusOfTask status_of_task)
Returns a string representation of the task status.
- Parameters:
status_of_task – Task status (enabled or disabled).
- Returns:
“enabled” if the task is enabled, otherwise “disabled”.
-
inline std::string GetStringTaskType(TypeOfTask type_of_task, const std::string &settings_file_path)
Returns a string representation of the task type based on the JSON settings file.
- Parameters:
type_of_task – Type of the task.
settings_file_path – Path to the JSON file containing task type strings.
- Throws:
std::runtime_error – If the file cannot be opened.
- Returns:
Formatted string combining the task type and its corresponding value from the file.
Constructs and returns a shared pointer to a task with the given input.
- Template Parameters:
TaskType – Type of the task to create.
InType – Type of the input.
- Parameters:
in – Input to pass to the task constructor.
- Returns:
Shared a pointer to the newly created task.
Variables
-
const TaskMappingArray kTaskTypeMappings = {{{TypeOfTask::kALL, "all"}, {TypeOfTask::kMPI, "mpi"}, {TypeOfTask::kOMP, "omp"}, {TypeOfTask::kSEQ, "seq"}, {TypeOfTask::kSTL, "stl"}, {TypeOfTask::kTBB, "tbb"}}}
-
template<typename InType, typename OutType>
class Task - #include <task.hpp>
Base abstract class representing a generic task with a defined pipeline.
- Template Parameters:
InType – Input data type.
OutType – Output data type.
-
using TaskMapping = std::pair<TypeOfTask, std::string>
Utility Module
-
namespace util
Typedefs
-
template<typename InType, typename OutType, typename TestType = void>
using FuncTestParam = std::tuple<std::function<ppc::task::TaskPtr<InType, OutType>(InType)>, std::string, TestType>
-
template<typename InType, typename OutType, typename TestType = void>
using GTestFuncParam = ::testing::TestParamInfo<FuncTestParam<InType, OutType, TestType>>
-
template<typename InType, typename OutType>
using PerfTestParam = std::tuple<std::function<ppc::task::TaskPtr<InType, OutType>(InType)>, std::string, ppc::performance::PerfResults::TypeOfRunning>
Enums
Functions
-
template<typename Tuple, std::size_t... Is>
auto ExpandToValuesImpl(const Tuple &t, std::index_sequence<Is...>)
-
template<typename Task, typename InType, typename SizesContainer, std::size_t... Is>
auto GenTaskTuplesImpl(const SizesContainer &sizes, const std::string &settings_path, std::index_sequence<Is...>)
-
template<typename Task, typename InType, typename SizesContainer>
auto TaskListGenerator(const SizesContainer &sizes, const std::string &settings_path)
-
template<typename Task, typename InType, typename SizesContainer>
constexpr auto AddFuncTask(const SizesContainer &sizes, const std::string &settings_path)
-
double GetTimeMPI()
-
int GetMPIRank()
-
template<typename TaskType, typename InputType>
auto MakePerfTaskTuples(const std::string &settings_path)
-
template<typename Tuple, std::size_t... I>
auto TupleToGTestValuesImpl(const Tuple &tup, std::index_sequence<I...>)
-
template<typename InputType, typename ...TaskTypes>
auto MakeAllPerfTasks(const std::string &settings_path)
-
std::string GetAbsoluteTaskPath(const std::string &id_path, const std::string &relative_path)
-
int GetNumThreads()
-
int GetNumProc()
-
double GetTaskMaxTime()
-
double GetPerfMaxTime()
-
template<typename T>
std::string GetNamespace()
-
inline std::shared_ptr<nlohmann::json> InitJSONPtr()
-
bool IsUnderMpirun()
-
template<typename InType, typename OutType, typename TestType = void>
class BaseRunFuncTests : public testing::TestWithParam<FuncTestParam<InType, OutType, void>> - #include <func_test_util.hpp>
Base class for running functional tests on parallel tasks.
- Template Parameters:
InType – Type of input data.
OutType – Type of output data.
TestType – Type of the test case or parameter.
-
template<typename InType, typename OutType>
class BaseRunPerfTests : public testing::TestWithParam<PerfTestParam<InType, OutType>> - #include <perf_test_util.hpp>
Base class for performance testing of parallel tasks.
- Template Parameters:
InType – Input data type.
OutType – Output data type.
-
class DestructorFailureFlag
- #include <util.hpp>
Utility class for tracking destructor failure across tests.
Provides thread-safe methods to set, unset, and check the failure flag.
-
template<typename InType, typename OutType, typename TestType = void>
Performance Module
-
namespace performance
Functions
-
inline double DefaultTimer()
-
inline std::string GetStringParamName(PerfResults::TypeOfRunning type_of_running)
-
template<typename InType, typename OutType>
class Perf - #include <performance.hpp>
-
struct PerfAttr
- #include <performance.hpp>
-
struct PerfResults
- #include <performance.hpp>
-
inline double DefaultTimer()