Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_data
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_data
Commits
69ff97de
Commit
69ff97de
authored
1 year ago
by
yaskovet
Browse files
Options
Downloads
Patches
Plain Diff
Fix template substitution failure for Graph_CSR with no edge (get_lin)
parent
ae24cae2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/memory_ly/memory_conf.hpp
+16
-2
16 additions, 2 deletions
src/memory_ly/memory_conf.hpp
with
16 additions
and
2 deletions
src/memory_ly/memory_conf.hpp
+
16
−
2
View file @
69ff97de
...
@@ -249,6 +249,7 @@ struct memory_traits_lin
...
@@ -249,6 +249,7 @@ struct memory_traits_lin
typedef
boost
::
mpl
::
int_
<
AOS_layout
>
type_value
;
typedef
boost
::
mpl
::
int_
<
AOS_layout
>
type_value
;
/*! \brief Return a reference to the selected element
/*! \brief Return a reference to the selected element
* SFINAE is used to hande CSR graphs, where boost::fusion::at_c<p>(boost::fusion::vector<>) breaks in boost 1.8* onwards
*
*
* \param data object from where to take the element
* \param data object from where to take the element
* \param g1 grid information
* \param g1 grid information
...
@@ -286,13 +287,14 @@ struct memory_traits_lin
...
@@ -286,13 +287,14 @@ struct memory_traits_lin
* \return a reference to the object selected
* \return a reference to the object selected
*
*
*/
*/
template
<
unsigned
int
p
,
typename
data_type
,
typename
g1_type
>
template
<
unsigned
int
p
,
typename
data_type
,
typename
g1_type
,
typename
std
::
enable_if
<!
std
::
is_same
<
data_type
,
memory_c
<
boost
::
fusion
::
vector
<
>,
1
,
memory
>>::
value
,
int
>::
type
=
0
>
__host__
__device__
static
inline
auto
get_lin
(
data_type
&
data_
,
const
g1_type
&
g1
,
const
size_t
lin_id
)
->
decltype
(
boost
::
fusion
::
at_c
<
p
>
(
data_
.
mem_r
.
operator
[](
lin_id
)))
&
__host__
__device__
static
inline
auto
get_lin
(
data_type
&
data_
,
const
g1_type
&
g1
,
const
size_t
lin_id
)
->
decltype
(
boost
::
fusion
::
at_c
<
p
>
(
data_
.
mem_r
.
operator
[](
lin_id
)))
&
{
{
return
boost
::
fusion
::
at_c
<
p
>
(
data_
.
mem_r
.
operator
[](
lin_id
));
return
boost
::
fusion
::
at_c
<
p
>
(
data_
.
mem_r
.
operator
[](
lin_id
));
}
}
/*! \brief Return a reference to the selected element
/*! \brief Return a reference to the selected element
* SFINAE is used to hande CSR graphs, where boost::fusion::at_c<p>(boost::fusion::vector<>) breaks in boost 1.8* onwards
*
*
* \param data object from where to take the element
* \param data object from where to take the element
* \param g1 grid information
* \param g1 grid information
...
@@ -301,7 +303,19 @@ struct memory_traits_lin
...
@@ -301,7 +303,19 @@ struct memory_traits_lin
* \return a reference to the object selected
* \return a reference to the object selected
*
*
*/
*/
template
<
unsigned
int
p
,
typename
data_type
,
typename
g1_type
,
typename
key_type
>
template
<
unsigned
int
p
,
typename
data_type
,
typename
g1_type
,
typename
std
::
enable_if
<
std
::
is_same
<
data_type
,
memory_c
<
boost
::
fusion
::
vector
<
>,
1
,
memory
>>::
value
,
int
>::
type
=
0
>
__host__
__device__
static
inline
auto
get_lin
(
data_type
&
data_
,
const
g1_type
&
g1
,
const
size_t
lin_id
)
{}
/*! \brief Return a reference to the selected element
*
* \param data object from where to take the element
* \param g1 grid information
* \param v1 element id
*
* \return a reference to the object selected
*
*/
template
<
unsigned
int
p
,
typename
data_type
,
typename
g1_type
,
typename
key_type
,
typename
std
::
enable_if
<!
std
::
is_same
<
data_type
,
memory_c
<
boost
::
fusion
::
vector
<
>,
1
,
memory
>>::
value
,
int
>::
type
=
0
>
__host__
__device__
static
inline
auto
get_c
(
const
data_type
&
data_
,
const
g1_type
&
g1
,
const
key_type
&
v1
)
->
decltype
(
boost
::
fusion
::
at_c
<
p
>
(
data_
.
mem_r
.
operator
[](
g1
.
LinId
(
v1
))))
&
__host__
__device__
static
inline
auto
get_c
(
const
data_type
&
data_
,
const
g1_type
&
g1
,
const
key_type
&
v1
)
->
decltype
(
boost
::
fusion
::
at_c
<
p
>
(
data_
.
mem_r
.
operator
[](
g1
.
LinId
(
v1
))))
&
{
{
return
boost
::
fusion
::
at_c
<
p
>
(
data_
.
mem_r
.
operator
[](
g1
.
LinId
(
v1
)));
return
boost
::
fusion
::
at_c
<
p
>
(
data_
.
mem_r
.
operator
[](
g1
.
LinId
(
v1
)));
...
...
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