diff options
author | Ralph Amissah <ralph@amissah.com> | 2018-08-04 23:53:50 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-10 15:14:15 -0400 |
commit | e3069103f1db73076b0ce8b645729a9744648dd7 (patch) | |
tree | 8fde121b508462d5fea148c3cfa1d0bfc25b35f6 /src/sdp/sdp.d | |
parent | catches (diff) |
nested parallelisation, output task scheduler
- default off, --pp2 to use
Diffstat (limited to 'src/sdp/sdp.d')
-rwxr-xr-x | src/sdp/sdp.d | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/sdp/sdp.d b/src/sdp/sdp.d index 5a4c2f8..a135423 100755 --- a/src/sdp/sdp.d +++ b/src/sdp/sdp.d @@ -22,6 +22,7 @@ import sdp.source.read_config_files, sdp.source.read_source_files, sdp.output.hub; +import std.algorithm; import std.parallelism; mixin(import("version.txt")); mixin CompileTimeInfo; @@ -69,6 +70,7 @@ void main(string[] args) { "html-scroll" : false, "manifest" : false, "ocn" : true, + "pp2" : false, "quiet" : false, "sisupod" : false, "source" : false, @@ -112,6 +114,7 @@ void main(string[] args) { "html-scroll", "--html-seg process html output", &opts["html-scroll"], "manifest", "--manifest process manifest output", &opts["manifest"], "ocn", "--ocn object cite numbers (default)", &opts["ocn"], + "pp2", "--pp2 nested parallelisation", &opts["pp2"], "quiet", "--quiet output to terminal", &opts["quiet"], "sisupod", "--sisupod sisupod source content bundled", &opts["sisupod"], "source", "--source markup source text content", &opts["source"], @@ -145,6 +148,7 @@ void main(string[] args) { if (helpInfo.helpWanted) { defaultGetoptPrinter("Some information about the program.", helpInfo.options); } + enum outTask { sisupod, source, sqlite, sqlite_multi, epub, html_scroll, html_seg, html_stuff } struct OptActions { auto assertions() { return opts["assertions"]; @@ -298,6 +302,34 @@ void main(string[] args) { auto sqlite_filename() { return settings["sqlite-filename"]; } + auto pp2() { + return opts["pp2"]; + } + auto output_task_scheduler() { + int[] schedule; + if (sisupod) { + schedule ~= outTask.sisupod; + } + if (source) { + schedule ~= outTask.source; + } + if (sqlite_discrete) { + schedule ~= outTask.sqlite; + } + if (epub) { + schedule ~= outTask.epub; + } + if (html_scroll) { + schedule ~= outTask.html_scroll; + } + if (html_seg) { + schedule ~= outTask.html_seg; + } + if (html_stuff) { + schedule ~= outTask.html_stuff; + } + return schedule.sort().uniq; + } auto abstraction() { bool _is = ( opts["abstraction"] |