Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6602c21b
authored
Jan 26, 2015
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
algorithms_cpp: block_size support in MergeSort
parent
9552a32a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
4 deletions
+1
-4
algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h
+0
-3
algorithms_cpp/test/merge_sort_test.cc
+1
-1
No files found.
algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h
View file @
6602c21b
...
...
@@ -170,9 +170,6 @@ void MergeSort(
difference_type
distance
=
last
-
first
;
assert
(
distance
>=
0
);
assert
(
block_size
==
0
);
// TODO(Georgios Christodoulou):
// Take block size into account
if
(
block_size
==
0
)
{
block_size
=
(
static_cast
<
size_t
>
(
distance
)
/
node
.
GetCoreCount
());
if
(
block_size
==
0
)
...
...
algorithms_cpp/test/merge_sort_test.cc
View file @
6602c21b
...
...
@@ -64,7 +64,7 @@ void MergeSortTest::TestDataStructures() {
MergeSortAllocate
(
array
,
array
+
kCountSize
);
MergeSortAllocate
(
vector
.
begin
(),
vector
.
end
());
MergeSortAllocate
(
array
,
array
+
kCountSize
,
std
::
less
<
int
>
(),
ExecutionPolicy
(),
0
);
ExecutionPolicy
(),
2
);
MergeSortAllocate
(
deque
.
begin
(),
deque
.
end
());
for
(
size_t
i
=
0
;
i
<
kCountSize
;
i
++
)
{
PT_EXPECT_EQ
(
vector_copy
[
i
],
array
[
i
]);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment