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 /org/sdp.org | |
parent | catches (diff) |
nested parallelisation, output task scheduler
- default off, --pp2 to use
Diffstat (limited to 'org/sdp.org')
-rw-r--r-- | org/sdp.org | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/org/sdp.org b/org/sdp.org index 5a0160d..499224a 100644 --- a/org/sdp.org +++ b/org/sdp.org @@ -70,6 +70,7 @@ import sdp.conf.compile_time_info, sdp.meta.metadoc; <<imports_sdp>> +import std.algorithm; import std.parallelism; <<mixin_sdp_version>> <<mixin_pre_main>> @@ -238,6 +239,7 @@ bool[string] opts = [ "html-scroll" : false, "manifest" : false, "ocn" : true, + "pp2" : false, "quiet" : false, "sisupod" : false, "source" : false, @@ -281,6 +283,7 @@ auto helpInfo = getopt(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"], @@ -320,6 +323,7 @@ if (helpInfo.helpWanted) { #+NAME: sdp_args #+BEGIN_SRC d +enum outTask { sisupod, source, sqlite, sqlite_multi, epub, html_scroll, html_seg, html_stuff } struct OptActions { auto assertions() { return opts["assertions"]; @@ -473,6 +477,34 @@ struct OptActions { 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"] |