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
d527a413
Commit
d527a413
authored
4 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Fixing subset and 3d bugs
parent
2baca256
No related branches found
No related tags found
No related merge requests found
Pipeline
#2242
failed
4 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openfpm_numerics
+1
-1
1 addition, 1 deletion
openfpm_numerics
src/Vector/vector_dist_subset.hpp
+23
-2
23 additions, 2 deletions
src/Vector/vector_dist_subset.hpp
with
24 additions
and
3 deletions
openfpm_numerics
@
f7b398cc
Subproject commit
7d1d7a70c8d1ee5eddbf5da91b614149a3118812
Subproject commit
f7b398cc11330c6b15d0b44e4ee320731a71a77a
This diff is collapsed.
Click to expand it.
src/Vector/vector_dist_subset.hpp
+
23
−
2
View file @
d527a413
...
...
@@ -23,6 +23,15 @@ class vector_dist_subset
size_t
g_m
=
0
;
void
update_gm
()
{
g_m
=
0
;
for
(
size_t
i
=
0
;
i
<
pid
.
size
()
;
i
++
)
{
g_m
+=
(
pid
.
template
get
<
0
>(
i
)
<
vd
.
size_local
())
?
1
:
0
;
}
}
public
:
//! property object
...
...
@@ -45,12 +54,24 @@ public:
openfpm
::
vector
<
aggregate
<
int
>>
&
pid
)
:
vd
(
vd
),
pid
(
pid
)
{
update_gm
();
}
/*! \brief Update the subset indexes
*
*/
inline
void
update
(
openfpm
::
vector
<
aggregate
<
int
>>
&
pid
)
{
this
->
pid
.
resize
(
pid
.
size
());
for
(
size_t
i
=
0
;
i
<
pid
.
size
()
;
i
++
)
{
g_m
+=
(
pid
.
template
get
<
0
>(
i
)
<
vd
.
size_local
())
?
1
:
0
;
this
->
pid
.
template
get
<
0
>(
i
)
=
pid
.
template
get
<
0
>(
i
)
;
}
}
update_gm
();
}
/*! \brief Get the decomposition
*
...
...
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