Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openfpm_pdata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
argupta
openfpm_pdata
Commits
d1682087
Commit
d1682087
authored
9 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Missing one part in nn_processors.hpp during refactoring
parent
53f2c470
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Decomposition/CartDecomposition.hpp
+6
-25
6 additions, 25 deletions
src/Decomposition/CartDecomposition.hpp
src/Decomposition/nn_processor.hpp
+19
-0
19 additions, 0 deletions
src/Decomposition/nn_processor.hpp
with
25 additions
and
25 deletions
src/Decomposition/CartDecomposition.hpp
+
6
−
25
View file @
d1682087
...
...
@@ -316,31 +316,6 @@ private:
// Receive counter
size_t
recv_cnt
;
/*! \brief Message allocation
*
* \param message size required to receive from i
* \param total message size to receive from all the processors
* \param the total number of processor want to communicate with you
* \param i processor id
* \param ri request id (it is an id that goes from 0 to total_p, and is unique
* every time message_alloc is called)
* \param ptr a pointer to the vector_dist structure
*
* \return the pointer where to store the message
*
*/
static
void
*
message_alloc
(
size_t
msg_i
,
size_t
total_msg
,
size_t
total_p
,
size_t
i
,
size_t
ri
,
void
*
ptr
)
{
// cast the pointer
CartDecomposition
<
dim
,
T
,
device_l
,
Memory
,
Domain
>
*
cd
=
static_cast
<
CartDecomposition
<
dim
,
T
,
device_l
,
Memory
,
Domain
>
*>
(
ptr
);
// Resize the memory
cd
->
nn_processor_subdomains
[
i
].
bx
.
resize
(
msg_i
/
sizeof
(
::
Box
<
dim
,
T
>
)
);
// Return the receive pointer
return
cd
->
nn_processor_subdomains
[
i
].
bx
.
getPointer
();
}
public
:
/*! \brief Cartesian decomposition constructor
...
...
@@ -809,6 +784,12 @@ p1[0]<-----+ +----> p2[0]
void
debugPrint
()
{
std
::
cout
<<
"Subdomains
\n
"
;
for
(
size_t
p
=
0
;
p
<
sub_domains
.
size
()
;
p
++
)
{
std
::
cout
<<
::
SpaceBox
<
dim
,
T
>
(
sub_domains
.
get
(
p
)).
toString
()
<<
"
\n
"
;
}
std
::
cout
<<
"External ghost box
\n
"
;
for
(
size_t
p
=
0
;
p
<
nn_prcs
<
dim
,
T
>::
getNNProcessors
()
;
p
++
)
...
...
This diff is collapsed.
Click to expand it.
src/Decomposition/nn_processor.hpp
+
19
−
0
View file @
d1682087
...
...
@@ -91,6 +91,25 @@ public:
auto
last
=
std
::
unique
(
nn_processors
.
begin
(),
nn_processors
.
end
());
nn_processors
.
erase
(
last
,
nn_processors
.
end
());
// produce the list of the contiguous processor (nn_processors) and link nn_processor_subdomains to the
// processor list (nn_processors)
for
(
size_t
i
=
0
;
i
<
box_nn_processor
.
size
()
;
i
++
)
{
for
(
size_t
j
=
0
;
j
<
box_nn_processor
.
get
(
i
).
size
()
;
j
++
)
{
// processor id near to this sub-domain
size_t
proc_id
=
box_nn_processor
.
get
(
i
).
get
(
j
);
size_t
k
=
0
;
// search inside near processor list
for
(
k
=
0
;
k
<
nn_processors
.
size
()
;
k
++
)
if
(
nn_processors
.
get
(
k
)
==
proc_id
)
break
;
nn_processor_subdomains
[
proc_id
].
id
=
k
;
}
}
// create a buffer with the sub-domains of this processor, the informations ( the boxes )
// of the sub-domains contiguous to the processor A are sent to the processor A and
// the information of the contiguous sub-domains in the near processors are received
...
...
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