From e3069103f1db73076b0ce8b645729a9744648dd7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 4 Aug 2018 23:53:50 -0400 Subject: nested parallelisation, output task scheduler - default off, --pp2 to use --- org/sdp.org | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'org/sdp.org') 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; <> +import std.algorithm; import std.parallelism; <> <> @@ -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"] -- cgit v1.2.3