Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_pdata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_pdata
Commits
b89b618c
Commit
b89b618c
authored
5 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Refactorized grid pack
parent
acabde02
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Grid/grid_dist_id_comm.hpp
+13
-4
13 additions, 4 deletions
src/Grid/grid_dist_id_comm.hpp
with
13 additions
and
4 deletions
src/Grid/grid_dist_id_comm.hpp
+
13
−
4
View file @
b89b618c
...
...
@@ -158,7 +158,7 @@ class grid_dist_id_comm
openfpm
::
vector
<
size_t
>
send_size
;
//! receiving buffers in case of dynamic
openfpm
::
vector
<
BMemory
<
Heap
Memory
>>
recv_buffers
;
openfpm
::
vector
<
BMemory
<
Memory
>>
recv_buffers
;
//! receiving processors
openfpm
::
vector
<
size_t
>
recv_proc
;
...
...
@@ -553,7 +553,7 @@ class grid_dist_id_comm
// Unpack the ghost box global-id
unpack_data_to_ext_ghost
<
Heap
Memory
,
prp
...
>
(
prRecv_prp
,
loc_grid
,
i
,
unpack_data_to_ext_ghost
<
Memory
,
prp
...
>
(
prRecv_prp
,
loc_grid
,
i
,
eg_box
,
g_id_to_external_ghost_box
,
eb_gid_list
,
ps
);
}
...
...
@@ -567,14 +567,14 @@ class grid_dist_id_comm
Unpack_stat
ps
;
size_t
mark_here
=
ps
.
getOffset
();
ExtPreAlloc
<
BMemory
<
Heap
Memory
>>
mem
(
recv_buffers
.
get
(
i
).
size
(),
recv_buffers
.
get
(
i
));
ExtPreAlloc
<
BMemory
<
Memory
>>
mem
(
recv_buffers
.
get
(
i
).
size
(),
recv_buffers
.
get
(
i
));
// for each external ghost box
while
(
ps
.
getOffset
()
-
mark_here
<
recv_buffers
.
get
(
i
).
size
())
{
// Unpack the ghost box global-id
unpack_data_to_ext_ghost
<
BMemory
<
Heap
Memory
>
,
prp
...
>
(
mem
,
loc_grid
,
i
,
unpack_data_to_ext_ghost
<
BMemory
<
Memory
>
,
prp
...
>
(
mem
,
loc_grid
,
i
,
eg_box
,
g_id_to_external_ghost_box
,
eb_gid_list
,
ps
);
}
...
...
@@ -969,6 +969,11 @@ public:
size_t
req
=
0
;
// first we initialize the pack buffer on all internal grids
for
(
size_t
i
=
0
;
i
<
loc_grid
.
size
()
;
i
++
)
{
loc_grid
.
get
(
i
).
packReset
();}
// Calculating the size to pack all the data to send
for
(
size_t
i
=
0
;
i
<
ig_box
.
size
()
;
i
++
)
{
...
...
@@ -995,6 +1000,10 @@ public:
}
}
// Finalize calculation
for
(
size_t
i
=
0
;
i
<
loc_grid
.
size
()
;
i
++
)
{
loc_grid
.
get
(
i
).
packCalculate
(
req
,
v_cl
.
getmgpuContext
());}
// resize the property buffer memory
g_send_prp_mem
.
resize
(
req
);
...
...
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