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
f49ddd28
Commit
f49ddd28
authored
13 years ago
by
BRAMAS Berenger
Browse files
Options
Downloads
Patches
Plain Diff
Improve starpu fmm core
parent
b41fbaf5
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/Core/FFmmAlgorithmStarpu.hpp
+24
-12
24 additions, 12 deletions
Src/Core/FFmmAlgorithmStarpu.hpp
with
24 additions
and
12 deletions
Src/Core/FFmmAlgorithmStarpu.hpp
+
24
−
12
View file @
f49ddd28
// ===================================================================================
// Logiciel initial: ScalFmm Version 0.5
// Co-auteurs : Olivier Coulaud, Bérenger Bramas.
// Propriétaires : INRIA.
// Copyright © 2011-2012, diffusé sous les termes et conditions d’une licence propriétaire.
// Initial software: ScalFmm Version 0.5
// Co-authors: Olivier Coulaud, Bérenger Bramas.
// Owners: INRIA.
// Copyright © 2011-2012, spread under the terms and conditions of a proprietary license.
// ===================================================================================
#ifndef FFMMALGORITHMSTARPU_HPP
#ifndef FFMMALGORITHMSTARPU_HPP
#define FFMMALGORITHMSTARPU_HPP
#define FFMMALGORITHMSTARPU_HPP
// /!\ Please, you must read the license at the bottom of this page
// /!\ Please, you must read the license at the bottom of this page
...
@@ -73,10 +83,12 @@ template <class CellClass>
...
@@ -73,10 +83,12 @@ template <class CellClass>
class
FStarCell
:
public
CellClass
{
class
FStarCell
:
public
CellClass
{
public:
public:
/** The handle to register the data */
/** The handle to register the data */
StarHandle
handle
;
StarHandle
handleUp
;
StarHandle
handleDown
;
/** Called by fmm starpu to register data */
/** Called by fmm starpu to register data */
void
initHandle
(){
void
initHandle
(){
handle
.
registerVariable
(
static_cast
<
CellClass
*>
(
this
)
);
handleUp
.
registerVariable
(
static_cast
<
CellClass
*>
(
this
)
);
handleDown
.
registerVariable
(
static_cast
<
CellClass
*>
(
this
)
);
}
}
};
};
...
@@ -448,7 +460,7 @@ public:
...
@@ -448,7 +460,7 @@ public:
// P2M
// P2M
{
{
//kernels->P2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc());
//kernels->P2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc());
starpu_insert_task
(
&
p2m_cl
,
STARPU_W
,
octreeIterator
.
getCurrentCell
()
->
handle
.
handle
,
starpu_insert_task
(
&
p2m_cl
,
STARPU_W
,
octreeIterator
.
getCurrentCell
()
->
handle
Up
.
handle
,
STARPU_R
,
octreeIterator
.
getCurrentLeaf
()
->
getSrc
()
->
handle
.
handle
,
0
);
STARPU_R
,
octreeIterator
.
getCurrentLeaf
()
->
getSrc
()
->
handle
.
handle
,
0
);
}
}
// P2P
// P2P
...
@@ -523,14 +535,14 @@ public:
...
@@ -523,14 +535,14 @@ public:
// create task
// create task
struct
starpu_task
*
const
task
=
starpu_task_create
();
struct
starpu_task
*
const
task
=
starpu_task_create
();
// buffer 0 is current leaf
// buffer 0 is current leaf
task
->
handles
[
0
]
=
octreeIterator
.
getCurrentCell
()
->
handle
.
handle
;
task
->
handles
[
0
]
=
octreeIterator
.
getCurrentCell
()
->
handle
Down
.
handle
;
// insert other with a mask
// insert other with a mask
memset
(
mask_m2l
,
0
,
sizeof
(
unsigned
int
)
*
12
);
memset
(
mask_m2l
,
0
,
sizeof
(
unsigned
int
)
*
12
);
int
idxInsert
=
1
;
int
idxInsert
=
1
;
for
(
int
idxNeigh
=
0
;
idxNeigh
<
343
;
++
idxNeigh
){
for
(
int
idxNeigh
=
0
;
idxNeigh
<
343
;
++
idxNeigh
){
if
(
neighbors
[
idxNeigh
]
){
if
(
neighbors
[
idxNeigh
]
){
task
->
handles
[
idxInsert
++
]
=
neighbors
[
idxNeigh
]
->
handle
.
handle
;
task
->
handles
[
idxInsert
++
]
=
neighbors
[
idxNeigh
]
->
handle
Up
.
handle
;
mask_m2l
[
idxNeigh
>>
5
]
=
mask_m2l
[
idxNeigh
>>
5
]
|
(
1
<<
(
idxNeigh
&
0x1F
));
mask_m2l
[
idxNeigh
>>
5
]
=
mask_m2l
[
idxNeigh
>>
5
]
|
(
1
<<
(
idxNeigh
&
0x1F
));
}
}
}
}
...
@@ -562,14 +574,14 @@ public:
...
@@ -562,14 +574,14 @@ public:
//kernels->M2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
//kernels->M2M( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
struct
starpu_task
*
const
task
=
starpu_task_create
();
struct
starpu_task
*
const
task
=
starpu_task_create
();
// buffer 0 is parent cell
// buffer 0 is parent cell
task
->
handles
[
0
]
=
octreeIterator
.
getCurrentCell
()
->
handle
.
handle
;
task
->
handles
[
0
]
=
octreeIterator
.
getCurrentCell
()
->
handle
Up
.
handle
;
// add child with mask
// add child with mask
unsigned
int
mask
=
0
;
unsigned
int
mask
=
0
;
int
idxInsert
=
1
;
int
idxInsert
=
1
;
CellClass
*
const
*
const
child
=
octreeIterator
.
getCurrentChild
();
CellClass
*
const
*
const
child
=
octreeIterator
.
getCurrentChild
();
for
(
int
idxChild
=
0
;
idxChild
<
8
;
++
idxChild
){
for
(
int
idxChild
=
0
;
idxChild
<
8
;
++
idxChild
){
if
(
child
[
idxChild
]){
if
(
child
[
idxChild
]){
task
->
handles
[
idxInsert
++
]
=
child
[
idxChild
]
->
handle
.
handle
;
task
->
handles
[
idxInsert
++
]
=
child
[
idxChild
]
->
handle
Up
.
handle
;
mask
=
mask
|
(
1
<<
idxChild
);
mask
=
mask
|
(
1
<<
idxChild
);
}
}
}
}
...
@@ -600,14 +612,14 @@ public:
...
@@ -600,14 +612,14 @@ public:
// create task
// create task
struct
starpu_task
*
const
task
=
starpu_task_create
();
struct
starpu_task
*
const
task
=
starpu_task_create
();
// buffer 0 is current leaf
// buffer 0 is current leaf
task
->
handles
[
0
]
=
octreeIterator
.
getCurrentCell
()
->
handle
.
handle
;
task
->
handles
[
0
]
=
octreeIterator
.
getCurrentCell
()
->
handle
Down
.
handle
;
// insert other with a mask
// insert other with a mask
memset
(
mask_m2l
,
0
,
sizeof
(
unsigned
int
)
*
12
);
memset
(
mask_m2l
,
0
,
sizeof
(
unsigned
int
)
*
12
);
int
idxInsert
=
1
;
int
idxInsert
=
1
;
for
(
int
idxNeigh
=
0
;
idxNeigh
<
343
;
++
idxNeigh
){
for
(
int
idxNeigh
=
0
;
idxNeigh
<
343
;
++
idxNeigh
){
if
(
neighbors
[
idxNeigh
]
){
if
(
neighbors
[
idxNeigh
]
){
task
->
handles
[
idxInsert
++
]
=
neighbors
[
idxNeigh
]
->
handle
.
handle
;
task
->
handles
[
idxInsert
++
]
=
neighbors
[
idxNeigh
]
->
handle
Up
.
handle
;
mask_m2l
[
idxNeigh
>>
5
]
=
mask_m2l
[
idxNeigh
>>
5
]
|
(
1
<<
(
idxNeigh
&
0x1F
));
mask_m2l
[
idxNeigh
>>
5
]
=
mask_m2l
[
idxNeigh
>>
5
]
|
(
1
<<
(
idxNeigh
&
0x1F
));
}
}
}
}
...
@@ -658,14 +670,14 @@ public:
...
@@ -658,14 +670,14 @@ public:
//kernels->L2L( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
//kernels->L2L( octreeIterator.getCurrentCell() , octreeIterator.getCurrentChild(), idxLevel);
struct
starpu_task
*
const
task
=
starpu_task_create
();
struct
starpu_task
*
const
task
=
starpu_task_create
();
// buffer 0 is parent cell
// buffer 0 is parent cell
task
->
handles
[
0
]
=
octreeIterator
.
getCurrentCell
()
->
handle
.
handle
;
task
->
handles
[
0
]
=
octreeIterator
.
getCurrentCell
()
->
handle
Down
.
handle
;
// insert children with mask
// insert children with mask
unsigned
int
mask
=
0
;
unsigned
int
mask
=
0
;
int
idxInsert
=
1
;
int
idxInsert
=
1
;
CellClass
*
const
*
const
child
=
octreeIterator
.
getCurrentChild
();
CellClass
*
const
*
const
child
=
octreeIterator
.
getCurrentChild
();
for
(
int
idxChild
=
0
;
idxChild
<
8
;
++
idxChild
){
for
(
int
idxChild
=
0
;
idxChild
<
8
;
++
idxChild
){
if
(
child
[
idxChild
]){
if
(
child
[
idxChild
]){
task
->
handles
[
idxInsert
++
]
=
child
[
idxChild
]
->
handle
.
handle
;
task
->
handles
[
idxInsert
++
]
=
child
[
idxChild
]
->
handle
Down
.
handle
;
mask
=
mask
|
(
1
<<
idxChild
);
mask
=
mask
|
(
1
<<
idxChild
);
}
}
}
}
...
@@ -708,7 +720,7 @@ public:
...
@@ -708,7 +720,7 @@ public:
octreeIterator
.
gotoBottomLeft
();
octreeIterator
.
gotoBottomLeft
();
do
{
do
{
//kernels->L2P( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc());
//kernels->L2P( octreeIterator.getCurrentCell() , octreeIterator.getCurrentListSrc());
starpu_insert_task
(
&
l2p_cl
,
STARPU_R
,
octreeIterator
.
getCurrentCell
()
->
handle
.
handle
,
starpu_insert_task
(
&
l2p_cl
,
STARPU_R
,
octreeIterator
.
getCurrentCell
()
->
handle
Down
.
handle
,
STARPU_RW
,
octreeIterator
.
getCurrentLeaf
()
->
getTargets
()
->
handle
.
handle
,
0
);
STARPU_RW
,
octreeIterator
.
getCurrentLeaf
()
->
getTargets
()
->
handle
.
handle
,
0
);
}
while
(
octreeIterator
.
moveRight
());
}
while
(
octreeIterator
.
moveRight
());
...
...
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