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
ca032936
authored
Feb 26, 2015
by
Tobias Fuchs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
algorithms_cpp: Fix and cleanup of MergeSort
parent
2f755525
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
2 deletions
+2
-2
algorithms_cpp/include/embb/algorithms/internal/for_each-inl.h
+1
-1
algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h
+0
-0
algorithms_cpp/include/embb/algorithms/merge_sort.h
+1
-1
No files found.
algorithms_cpp/include/embb/algorithms/internal/for_each-inl.h
View file @
ca032936
...
@@ -116,7 +116,7 @@ void ForEachRecursive(RAI first, RAI last, Function unary,
...
@@ -116,7 +116,7 @@ void ForEachRecursive(RAI first, RAI last, Function unary,
block_size
=
1
;
block_size
=
1
;
}
}
}
}
//
Perform check of
task number sufficiency
//
Check
task number sufficiency
if
(((
distance
/
block_size
)
*
2
)
+
1
>
MTAPI_NODE_MAX_TASKS_DEFAULT
)
{
if
(((
distance
/
block_size
)
*
2
)
+
1
>
MTAPI_NODE_MAX_TASKS_DEFAULT
)
{
EMBB_THROW
(
embb
::
base
::
ErrorException
,
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"Not enough MTAPI tasks available for parallel foreach"
);
"Not enough MTAPI tasks available for parallel foreach"
);
...
...
algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h
View file @
ca032936
This diff is collapsed.
Click to expand it.
algorithms_cpp/include/embb/algorithms/merge_sort.h
View file @
ca032936
...
@@ -168,7 +168,7 @@ void MergeSortAllocate(
...
@@ -168,7 +168,7 @@ void MergeSortAllocate(
typename
std
::
iterator_traits
<
RAI
>::
difference_type
distance
=
last
-
first
;
typename
std
::
iterator_traits
<
RAI
>::
difference_type
distance
=
last
-
first
;
typedef
typename
std
::
iterator_traits
<
RAI
>::
value_type
value_type
;
typedef
typename
std
::
iterator_traits
<
RAI
>::
value_type
value_type
;
value_type
*
temporary
=
static_cast
<
value_type
*>
(
value_type
*
temporary
=
static_cast
<
value_type
*>
(
Alloc
::
Allocate
(
distance
*
sizeof
(
value_type
)));
Alloc
::
Allocate
(
distance
*
sizeof
(
value_type
)));
MergeSort
(
first
,
last
,
temporary
,
comparison
,
policy
,
block_size
);
MergeSort
(
first
,
last
,
temporary
,
comparison
,
policy
,
block_size
);
Alloc
::
Free
(
temporary
);
Alloc
::
Free
(
temporary
);
}
}
...
...
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