Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
O
openfpm_pdata
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openfpm
openfpm_pdata
Commits
7a4d5939
Commit
7a4d5939
authored
Jun 12, 2019
by
incardon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Latest modules
parent
4b6dfb72
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
6 deletions
+61
-6
openfpm_numerics
openfpm_numerics
+1
-1
src/Vector/cuda/vector_dist_operators_list_ker.hpp
src/Vector/cuda/vector_dist_operators_list_ker.hpp
+16
-5
src/Vector/vector_dist.hpp
src/Vector/vector_dist.hpp
+44
-0
No files found.
openfpm_numerics
@
45013703
Subproject commit
6b5c7f13d3940e261e5218e58e0c243008eecc4e
Subproject commit
450137038552dbcf28dc4379b362087da7ad8a46
src/Vector/cuda/vector_dist_operators_list_ker.hpp
View file @
7a4d5939
...
...
@@ -11,10 +11,11 @@
template
<
typename
T
>
struct
ref_wrap
{
bool
is_sorted
;
T
&
v
;
ref_wrap
(
T
&
v
)
:
v
(
v
)
ref_wrap
(
T
&
v
,
bool
is_sorted
)
:
v
(
v
)
,
is_sorted
(
is_sorted
)
{}
ref_wrap
&
operator
=
(
const
ref_wrap
<
T
>
&
rw
)
...
...
@@ -44,9 +45,9 @@ public:
*
*
*/
void
add
(
vector_dist_ker_type
&
v
)
void
add
(
vector_dist_ker_type
&
v
,
bool
is_sorted
)
{
ref_wrap
<
vector_dist_ker_type
>
rw
(
v
);
ref_wrap
<
vector_dist_ker_type
>
rw
(
v
,
is_sorted
);
vkers
.
add
(
rw
);
...
...
@@ -66,7 +67,17 @@ public:
{
for
(
size_t
i
=
0
;
i
<
vkers
.
size
()
;
i
++
)
{
vkers
.
get
(
i
).
v
=
v
;
if
(
vkers
.
get
(
i
).
is_sorted
==
false
)
{
vkers
.
get
(
i
).
v
=
v
;}
}
}
void
update_sort
(
const
vector_dist_ker_type
&
vs
)
{
for
(
size_t
i
=
0
;
i
<
vkers
.
size
()
;
i
++
)
{
if
(
vkers
.
get
(
i
).
is_sorted
==
true
)
{
vkers
.
get
(
i
).
v
=
vs
;}
}
}
...
...
src/Vector/vector_dist.hpp
View file @
7a4d5939
...
...
@@ -1270,6 +1270,10 @@ public:
cell_list
.
set_ndec
(
getDecomposition
().
get_ndec
());
cell_list
.
set_gm
(
g_m
);
#ifdef CUDA_GPU
this
->
update_sort
(
this
->
toKernel_sorted
());
#endif
return
cell_list
;
}
...
...
@@ -2727,6 +2731,46 @@ public:
return
v_prp
;
}
/*! \brief return the position vector of all the particles
*
* \return the particle position vector
*
*/
const
openfpm
::
vector
<
Point
<
dim
,
St
>
,
Memory
,
typename
layout_base
<
Point
<
dim
,
St
>>::
type
,
layout_base
>
&
getPosVectorSort
()
const
{
return
v_pos_out
;
}
/*! \brief return the position vector of all the particles
*
* \return the particle position vector
*
*/
openfpm
::
vector
<
Point
<
dim
,
St
>
,
Memory
,
typename
layout_base
<
Point
<
dim
,
St
>>::
type
,
layout_base
>
&
getPosVectorSort
()
{
return
v_pos_out
;
}
/*! \brief return the property vector of all the particles
*
* \return the particle property vector
*
*/
const
openfpm
::
vector
<
prop
,
Memory
,
typename
layout_base
<
prop
>::
type
,
layout_base
>
&
getPropVectorSort
()
const
{
return
v_prp_out
;
}
/*! \brief return the property vector of all the particles
*
* \return the particle property vector
*
*/
openfpm
::
vector
<
prop
,
Memory
,
typename
layout_base
<
prop
>::
type
,
layout_base
>
&
getPropVectorSort
()
{
return
v_prp_out
;
}
/*! \brief It return the sum of the particles in the previous processors
*
* \return the particles number
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment