Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
ScalFMM
Commits
898ec346
Commit
898ec346
authored
10 years ago
by
BRAMAS Berenger
Browse files
Options
Downloads
Patches
Plain Diff
Protect task on the Qs Omp and enable intel to use it
parent
413af066
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Src/Utils/FQuickSort.hpp
+8
-3
8 additions, 3 deletions
Src/Utils/FQuickSort.hpp
with
8 additions
and
3 deletions
Src/Utils/FQuickSort.hpp
+
8
−
3
View file @
898ec346
...
...
@@ -37,13 +37,18 @@
* The task based algorithm is easy to undestand,
* for the mpi/openmp2nd please see
* Introduction to parallel computing (Grama Gupta Karypis Kumar)
*
* In the previous version Intel Compiler was not using the QS with task
* defined(__ICC) || defined(__INTEL_COMPILER) defined the FQS_TASKS_ARE_DISABLED
*
* If needed one can define FQS_FORCE_NO_TASKS to ensure that the no task version is used.
*/
template
<
class
SortType
,
class
IndexType
=
size_t
>
class
FQuickSort
{
protected:
#if _OPENMP < 200805 || defined(
__ICC) || defined(__INTEL_COMPILER
)
#if _OPENMP < 200805 || defined(
FQS_FORCE_NO_TASKS
)
#define FQS_TASKS_ARE_DISABLED
class
TaskInterval
{
IndexType
left
;
...
...
@@ -117,9 +122,9 @@ protected:
if
(
left
<
right
){
const
IndexType
part
=
QsPartition
(
array
,
left
,
right
,
infOrEqual
);
if
(
deep
){
#pragma omp task
#pragma omp task
default(none) firstprivate(array, part, right, deep, infOrEqual)
QsOmpTask
(
array
,
part
+
1
,
right
,
deep
-
1
,
infOrEqual
);
// #pragma omp task // not needed
// #pragma omp task
default(none) firstprivate(array, part, right, deep, infOrEqual)
// not needed
QsOmpTask
(
array
,
left
,
part
-
1
,
deep
-
1
,
infOrEqual
);
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment