[PATCH][libstdc++-v3 parallel mode] Compile-time parallelism variant choice for multi-way merge
Johannes Singler
singler@ira.uka.de
Thu May 15 13:04:00 GMT 2008
This patch enables the compile-time choice of the parallelism variant,
for multi-way merging, this time, i. e. follows up onto the work on
sorting, so the arguments are pretty much the same.
This can reduce compilation time and object code size significantly.
Also, the user can propose the number of threads to use for a specific
call, without having to set it globally via omp_set_num_threads(). This
is important for the upcoming OpenMP-in-pthread nesting. The algorithms
still work correct even if not enough threads are alloted by the OpenMP
runtime. The default behavior is unchanged, conforming to OpenMP
conventions concerning the number of threads.
Tested x86_64-unknown-linux-gnu: No regressions.
Please approve for mainline.
2008-05-15 Johannes Singler <singler@ira.uka.de>
* doc/xml/manual/parallel_mode.xml:
Documented the new choices, factoring out common tags.
* include/parallel/multiway_merge.h:
Place comparison functor at the end, to comply with
established convention.
(parallel_multiway_merge) Pass number of threads explicitly.
Introduce new compile-time variants, make exact splitting the
default.
* include/parallel/tags.h:
Extend exact_tag, introduce sampling_tag.
* include/parallel/merge.h:
(parallel_merge_advance) Adapt to changed interface.
* include/parallel/multiway_mergesort.h: Likewise.
Johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mwm_compile_time_choice.patch
Type: text/x-patch
Size: 39266 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20080515/c658bba7/attachment.bin>
More information about the Libstdc++
mailing list