Commit 214ece29 by Johannes Singler Committed by Johannes Singler

2008-04-23 Johannes Singler <singler@ira.uka.de>

        * include/parallel/multiway_merge.h
        (multiway_merge_loser_tree):
        Leave checks to callers, add precondition instead.
        (multiway_merge_loser_tree_unguarded): Likewise.
        (multiway_merge_loser_tree_sentinel): Likewise.
        (sequential_multiway_merge): Added checks for total length 0.
        (parallel_multiway_merge): Skip empty sequences.
        (multiway_merge, all variants):
        Remove temporary variable, return directly.
        (stable_multiway_merge, all variants): Likewise.
        (multiway_merge_sentinels, all variants):  Likewise.
        (stable_multiway_merge_sentinels, all variants): Likewise.
        * include/parallel/multiseq_selection.h
        (multiseq_partition): More detailed assertions.

From-SVN: r134580
parent 7edc89d4
2008-04-23 Johannes Singler <singler@ira.uka.de>
* include/parallel/multiway_merge.h
(multiway_merge_loser_tree):
Leave checks to callers, add precondition instead.
(multiway_merge_loser_tree_unguarded): Likewise.
(multiway_merge_loser_tree_sentinel): Likewise.
(sequential_multiway_merge): Added checks for total length 0.
(parallel_multiway_merge): Skip empty sequences.
(multiway_merge, all variants):
Remove temporary variable, return directly.
(stable_multiway_merge, all variants): Likewise.
(multiway_merge_sentinels, all variants): Likewise.
(stable_multiway_merge_sentinels, all variants): Likewise.
* include/parallel/multiseq_selection.h
(multiseq_partition): More detailed assertions.
2008-04-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* acinclude.m4 (GLIBCXX_CHECK_SETRLIMIT, GLIBCXX_ENABLE_C99)
......
......@@ -151,16 +151,24 @@ namespace __gnu_parallel
nmax, n, r;
for (int i = 0; i < m; i++)
{
N += std::distance(begin_seqs[i].first, begin_seqs[i].second);
_GLIBCXX_PARALLEL_ASSERT(
std::distance(begin_seqs[i].first, begin_seqs[i].second) > 0);
}
if (rank == N)
{
for (int i = 0; i < m; i++)
begin_offsets[i] = begin_seqs[i].second; // Very end.
// Return m - 1;
return;
}
_GLIBCXX_PARALLEL_ASSERT(m != 0 && N != 0 && rank >= 0 && rank < N);
_GLIBCXX_PARALLEL_ASSERT(m != 0);
_GLIBCXX_PARALLEL_ASSERT(N != 0);
_GLIBCXX_PARALLEL_ASSERT(rank >= 0);
_GLIBCXX_PARALLEL_ASSERT(rank < N);
difference_type* ns = new difference_type[m];
difference_type* a = new difference_type[m];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment