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
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
solverstack
ScalFMM
Commits
0523b9d6
Commit
0523b9d6
authored
10 years ago
by
BRAMAS Berenger
Browse files
Options
Downloads
Patches
Plain Diff
Continue to prepare the block tree
parent
282fda26
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/GroupTree/FGroupTaskAlgorithm.hpp
+35
-35
35 additions, 35 deletions
Src/GroupTree/FGroupTaskAlgorithm.hpp
with
35 additions
and
35 deletions
Src/GroupTree/FGroupTaskAlgorithm.hpp
+
35
−
35
View file @
0523b9d6
...
...
@@ -118,7 +118,10 @@ protected:
typename
std
::
vector
<
OutOfBlockInteraction
>*
outsideInteractions
=
&
allOutsideInteractions
.
back
();
ParticleGroupClass
*
containers
=
(
*
iterParticles
);
#pragma omp task default(none) firstprivate(containers, outsideInteractions)
externalInteractionsLeafLevel
.
emplace_back
();
std
::
list
<
BlockInteractions
<
ParticleGroupClass
>>*
externalInteractions
=
&
externalInteractionsLeafLevel
.
back
();
#pragma omp task default(none) firstprivate(containers, outsideInteractions, externalInteractions)
{
// Can be a task(inout:iterCells, out:outsideInteractions)
const
MortonIndex
blockStartIdx
=
containers
->
getStartingIndex
();
const
MortonIndex
blockEndIdx
=
containers
->
getEndingIndex
();
...
...
@@ -151,6 +154,37 @@ protected:
// Sort to match external order
FQuickSort
<
OutOfBlockInteraction
,
int
>::
QsSequential
((
*
outsideInteractions
).
data
(),
int
((
*
outsideInteractions
).
size
()));
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
iterLeftParticles
=
tree
->
leavesBegin
();
int
currentOutInteraction
=
0
;
while
((
*
iterLeftParticles
)
!=
containers
&&
currentOutInteraction
<
int
((
*
outsideInteractions
).
size
())){
ParticleGroupClass
*
leftContainers
=
(
*
iterLeftParticles
);
const
MortonIndex
blockStartIdx
=
leftContainers
->
getStartingIndex
();
const
MortonIndex
blockEndIdx
=
leftContainers
->
getEndingIndex
();
while
(
currentOutInteraction
<
int
((
*
outsideInteractions
).
size
())
&&
(
*
outsideInteractions
)[
currentOutInteraction
].
outIndex
<
blockStartIdx
){
currentOutInteraction
+=
1
;
}
int
lastOutInteraction
=
currentOutInteraction
;
while
(
lastOutInteraction
<
int
((
*
outsideInteractions
).
size
())
&&
(
*
outsideInteractions
)[
lastOutInteraction
].
outIndex
<
blockEndIdx
){
lastOutInteraction
+=
1
;
}
const
int
nbInteractionsBetweenBlocks
=
(
lastOutInteraction
-
currentOutInteraction
);
if
(
nbInteractionsBetweenBlocks
){
externalInteractions
->
emplace_back
();
BlockInteractions
<
ParticleGroupClass
>*
interactions
=
&
externalInteractions
->
back
();
interactions
->
otherBlock
=
(
*
iterLeftParticles
);
interactions
->
interactions
.
resize
(
nbInteractionsBetweenBlocks
);
std
::
copy
((
*
outsideInteractions
).
begin
()
+
currentOutInteraction
,
(
*
outsideInteractions
).
begin
()
+
lastOutInteraction
,
interactions
->
interactions
.
begin
());
}
currentOutInteraction
=
lastOutInteraction
;
++
iterLeftParticles
;
}
}
++
iterParticles
;
}
...
...
@@ -165,41 +199,7 @@ protected:
// For each block (can be moved to a task or into the previous one)
while
(
iterParticles
!=
endParticles
){
typename
std
::
vector
<
OutOfBlockInteraction
>*
outsideInteractions
=
&
(
*
iterInteractions
);
externalInteractionsLeafLevel
.
emplace_back
();
std
::
list
<
BlockInteractions
<
ParticleGroupClass
>>*
externalInteractions
=
&
externalInteractionsLeafLevel
.
back
();
typename
std
::
list
<
ParticleGroupClass
*>::
iterator
iterLeftParticles
=
tree
->
leavesBegin
();
int
currentOutInteraction
=
0
;
while
(
iterLeftParticles
!=
iterParticles
&&
currentOutInteraction
<
int
((
*
outsideInteractions
).
size
())){
ParticleGroupClass
*
leftContainers
=
(
*
iterLeftParticles
);
const
MortonIndex
blockStartIdx
=
leftContainers
->
getStartingIndex
();
const
MortonIndex
blockEndIdx
=
leftContainers
->
getEndingIndex
();
while
(
currentOutInteraction
<
int
((
*
outsideInteractions
).
size
())
&&
(
*
outsideInteractions
)[
currentOutInteraction
].
outIndex
<
blockStartIdx
){
currentOutInteraction
+=
1
;
}
int
lastOutInteraction
=
currentOutInteraction
;
while
(
lastOutInteraction
<
int
((
*
outsideInteractions
).
size
())
&&
(
*
outsideInteractions
)[
lastOutInteraction
].
outIndex
<
blockEndIdx
){
lastOutInteraction
+=
1
;
}
const
int
nbInteractionsBetweenBlocks
=
(
lastOutInteraction
-
currentOutInteraction
);
if
(
nbInteractionsBetweenBlocks
){
externalInteractions
->
emplace_back
();
BlockInteractions
<
ParticleGroupClass
>*
interactions
=
&
externalInteractions
->
back
();
interactions
->
otherBlock
=
(
*
iterLeftParticles
);
interactions
->
interactions
.
resize
(
nbInteractionsBetweenBlocks
);
std
::
copy
((
*
outsideInteractions
).
begin
()
+
currentOutInteraction
,
(
*
outsideInteractions
).
begin
()
+
lastOutInteraction
,
interactions
->
interactions
.
begin
());
}
currentOutInteraction
=
lastOutInteraction
;
++
iterLeftParticles
;
}
++
iterParticles
;
++
iterInteractions
;
...
...
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