![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Typedefs | |
| using | json = nlohmann::json |
Functions | |
| bool | supported_version (const std::string &v) |
| WfCommonsLoader.SUPPORTED_SCHEMA_VERSIONS. | |
| bool | has (const json &o, const char *key) |
| bool | nonempty (const json &v) |
| ~isempty(x) on a decoded JSON value. | |
| std::string | as_text (const json &v) |
| A JSON scalar as the text strcmp compares: strings verbatim, numbers as written. | |
| void | validate_schema (const json &data) |
| Port of validateSchema. | |
| std::string | file_stem (const std::string &s) |
| [~, name, ~] = fileparts(s). | |
| std::string | extract_name (const json &data, const std::string &default_name) |
| Port of extractName: the document's name, else the default's stem, sanitized. | |
| std::string | task_id (const json &task, std::size_t idx1) |
| Port of getTaskId. | |
| template<class T> | |
| lang::Distrib< T > | fit_distribution (double runtime, const WfCommonsOptions &opt) |
| Port of fitDistribution. | |
| std::map< std::string, std::string > | extract_metadata (const json &task, const std::string &id, const json *exec) |
| Port of extractMetadata; values are the JSON text of each field. | |
| std::vector< std::size_t > | reachable_nodes (std::size_t start, const std::vector< std::vector< std::size_t > > &adj) |
| Port of getReachableNodes: BFS order, the start excluded. | |
| std::size_t | find_common_join (const std::vector< std::size_t > &children, const std::vector< std::vector< std::size_t > > &adj, const std::vector< std::size_t > &indeg) |
| Port of findCommonJoin. | |
| template<class T> | |
| workflow::Workflow< T > | build_workflow (const json &data, const std::string &wf_name, const WfCommonsOptions &opt) |
| Port of buildWorkflow (with buildAdjacency and addPrecedences). | |
| json | parse_file (const std::string &path) |
| Parse a whole file as JSON, naming the file on failure. | |
| std::string | which_on_path (const std::string &name) |
| The first executable name on PATH, empty when there is none. | |
| std::string | fetch_https (const std::string &url, int timeout_ms) |
| GET an https:// URL with curl, else wget, into memory. | |
| using line::io::wfcommons_detail::json = nlohmann::json |
Definition at line 107 of file wfcommons_loader.h.
|
inline |
A JSON scalar as the text strcmp compares: strings verbatim, numbers as written.
Definition at line 124 of file wfcommons_loader.h.
References as_text().
Referenced by as_text(), build_workflow(), task_id(), and validate_schema().
| workflow::Workflow< T > line::io::wfcommons_detail::build_workflow | ( | const json & | data, |
| const std::string & | wf_name, | ||
| const WfCommonsOptions & | opt ) |
Port of buildWorkflow (with buildAdjacency and addPrecedences).
Definition at line 272 of file wfcommons_loader.h.
References as_text(), build_workflow(), extract_metadata(), find_common_join(), fit_distribution(), has(), line::InputError::InputError(), and task_id().
Referenced by build_workflow(), line::io::wfcommons_load(), line::io::wfcommons_load_from_json(), and line::io::wfcommons_load_from_url().
|
inline |
Port of extractMetadata; values are the JSON text of each field.
Definition at line 198 of file wfcommons_loader.h.
References extract_metadata(), and has().
Referenced by build_workflow(), and extract_metadata().
|
inline |
Port of extractName: the document's name, else the default's stem, sanitized.
Definition at line 157 of file wfcommons_loader.h.
References extract_name(), file_stem(), and has().
Referenced by extract_name(), line::io::wfcommons_load(), line::io::wfcommons_load_from_json(), and line::io::wfcommons_load_from_url().
|
inline |
GET an https:// URL with curl, else wget, into memory.
Redirects are followed but only to https, and an HTTP error status fails the fetch; the tool's own message is quoted in the InputError.
Definition at line 449 of file wfcommons_loader.h.
References line::util::capture(), line::util::ProcResult::exitCode, fetch_https(), line::util::TempDir::file(), line::InputError::InputError(), line::util::ProcResult::out, line::util::ProcResult::timedOut, line::util::trim(), line::UnsupportedError::UnsupportedError(), and which_on_path().
Referenced by fetch_https(), and line::io::wfcommons_load_from_url().
|
inline |
[~, name, ~] = fileparts(s).
Definition at line 148 of file wfcommons_loader.h.
References file_stem().
Referenced by extract_name(), file_stem(), and line::io::wfcommons_load_from_url().
|
inline |
Port of findCommonJoin.
intersect returns its result SORTED, so the first qualifying join is the one with the smallest task index.
Definition at line 241 of file wfcommons_loader.h.
References find_common_join(), and reachable_nodes().
Referenced by build_workflow(), and find_common_join().
| lang::Distrib< T > line::io::wfcommons_detail::fit_distribution | ( | double | runtime, |
| const WfCommonsOptions & | opt ) |
Port of fitDistribution.
Definition at line 178 of file wfcommons_loader.h.
References line::io::APH, line::lang::aph_fit_mean_scv(), line::io::DET, line::io::EXP, line::lang::GlobalConstants::FineTol, fit_distribution(), line::io::HYPEREXP, and line::lang::hyperexp_fit_mean_scv().
Referenced by build_workflow(), and fit_distribution().
|
inline |
Definition at line 114 of file wfcommons_loader.h.
References has().
Referenced by build_workflow(), extract_metadata(), extract_name(), has(), task_id(), and validate_schema().
|
inline |
~isempty(x) on a decoded JSON value.
Definition at line 117 of file wfcommons_loader.h.
References nonempty().
Referenced by nonempty(), and validate_schema().
|
inline |
Parse a whole file as JSON, naming the file on failure.
Definition at line 392 of file wfcommons_loader.h.
References line::InputError::InputError(), and parse_file().
Referenced by parse_file(), line::io::wfcommons_load(), and line::io::wfcommons_validate().
|
inline |
Port of getReachableNodes: BFS order, the start excluded.
Definition at line 216 of file wfcommons_loader.h.
References reachable_nodes().
Referenced by find_common_join(), and reachable_nodes().
|
inline |
WfCommonsLoader.SUPPORTED_SCHEMA_VERSIONS.
Definition at line 110 of file wfcommons_loader.h.
References supported_version().
Referenced by supported_version(), and validate_schema().
|
inline |
Port of getTaskId.
Definition at line 170 of file wfcommons_loader.h.
References as_text(), has(), and task_id().
Referenced by build_workflow(), and task_id().
|
inline |
Port of validateSchema.
Definition at line 127 of file wfcommons_loader.h.
References as_text(), has(), line::InputError::InputError(), nonempty(), supported_version(), and validate_schema().
Referenced by validate_schema(), line::io::wfcommons_load(), line::io::wfcommons_load_from_json(), line::io::wfcommons_load_from_url(), and line::io::wfcommons_validate().
|
inline |
The first executable name on PATH, empty when there is none.
Definition at line 431 of file wfcommons_loader.h.
References which_on_path().
Referenced by fetch_https(), and which_on_path().