NIST Biometric Evaluation Framework
Software components for biometric technology evaluations
be_mpi.h
Go to the documentation of this file.
1
10#ifndef _BE_MPI_H
11#define _BE_MPI_H
12
13#include <memory>
14#include <string>
15
17#include <be_io_logsheet.h>
18
19namespace BiometricEvaluation {
24 namespace MPI {
25
36 std::string generateUniqueID();
37
44 void printStatus(const std::string &message);
45
60 IO::Logsheet &logsheet);
61
75 IO::Logsheet &logsheet,
76 const std::string &message);
77
97 std::shared_ptr<BiometricEvaluation::IO::Logsheet> openLogsheet(
98 const std::string &url,
99 const std::string &description);
100
102 enum class TaskCommand : int32_t
103 {
105 Continue = 0,
107 Ignore = 1,
109 Exit = 2,
111 QuickExit = 3,
113 TermExit = 4
114 };
115
117 using taskcmd_t = std::underlying_type<TaskCommand>::type;
118
120 enum class TaskStatus : int32_t
121 {
123 OK = 0,
125 Failed = 1,
127 Exit = 2,
130 };
131
133 using taskstat_t = std::underlying_type<TaskStatus>::type;
134
136 enum class MessageTag : int32_t
137 {
139 Control = 0,
141 Data = 1,
148 OOB = 2
149 };
150
152 using msgtag_t = std::underlying_type<MessageTag>::type;
153 }
154}
155
158 BE_MPI_TaskCommand_EnumToStringMap);
159
162 BE_MPI_TaskStatus_EnumToStringMap);
163
166 BE_MPI_MessageTag_EnumToStringMap);
167
168#endif /* _BE_MPI_H */
169
BE_FRAMEWORK_ENUMERATION_DECLARATIONS(BiometricEvaluation::MPI::TaskCommand, BE_MPI_TaskCommand_EnumToStringMap)
A class to represent a logging mechanism.
TaskStatus
The status of an MPI distributor or receiver task.
Definition: be_mpi.h:121
@ RequestJobTermination
Requesting that Distributor stops the job.
std::underlying_type< TaskStatus >::type taskstat_t
Storage type for TaskStatus.
Definition: be_mpi.h:133
TaskCommand
The command given to an MPI task.
Definition: be_mpi.h:103
std::string generateUniqueID()
Obtain a unique ID for the current process.
std::shared_ptr< BiometricEvaluation::IO::Logsheet > openLogsheet(const std::string &url, const std::string &description)
Open a Logsheet object for a component of the MPI framework.
void printStatus(const std::string &message)
Print a status message to stdout.
void logMessage(IO::Logsheet &logsheet, const std::string &message)
Send a log message to the given Logsheet as a debug entry.
MessageTag
The types of messages sent between MPI task processes.
Definition: be_mpi.h:137
@ OOB
An out-of-band message, used when the normal control/data messaging cannot be used.
@ Control
A control message (start, exit, etc.)
void logEntry(IO::Logsheet &logsheet)
Send the current log stream to the log device as a debug entry.
std::underlying_type< MessageTag >::type msgtag_t
Storage type for MessageTag.
Definition: be_mpi.h:152
std::underlying_type< TaskCommand >::type taskcmd_t
Storage type for TaskCommand.
Definition: be_mpi.h:117
This software was developed at the National Institute of Standards and Technology (NIST) by employees...