Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ScalFMM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
solverstack
ScalFMM
Commits
16b8be1f
Commit
16b8be1f
authored
Jan 16, 2018
by
COULAUD Olivier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fux bug with clang-5.0 still some compilation errors occur and some tests are failed
parent
7610d859
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
28 deletions
+32
-28
Src/Adaptive/FVariadicParticleContainer.hpp
Src/Adaptive/FVariadicParticleContainer.hpp
+14
-12
Src/Utils/variadic_container.hpp
Src/Utils/variadic_container.hpp
+18
-16
No files found.
Src/Adaptive/FVariadicParticleContainer.hpp
View file @
16b8be1f
...
...
@@ -132,18 +132,20 @@ public:
position
,
args
...);
}
template
<
typename
Position
,
typename
...
Args
,
std
::
size_t
...
Is
,
std
::
size_t
...
Js
,
typename
...
Ts
>
void
push_impl
(
inria
::
index_sequence
<
Is
...
>
,
inria
::
index_sequence
<
Js
...
>
,
const
Position
&
position
,
Args
...
args
)
{
using
vt
=
typename
FBase
::
value_type
;
constexpr
auto
Dim
=
Particle
::
position_t
::
Dim
;
constexpr
int
missing_offset
=
Dim
+
sizeof
...(
args
);
this
->
push_back
(
std
::
get
<
Is
>
(
position
)...,
args
...,
std
::
tuple_element_t
<
missing_offset
+
Js
,
vt
>
{}...);
}
template
<
typename
Position
,
typename
...
Args
,
std
::
size_t
...
Is
,
std
::
size_t
...
Js
,
typename
...
Ts
>
void
push_impl
(
inria
::
index_sequence
<
Is
...
>
,
inria
::
index_sequence
<
Js
...
>
,
const
Position
&
position
,
Args
...
args
)
{
using
vt
=
typename
FBase
::
value_type
;
constexpr
auto
Dim
=
Particle
::
position_t
::
Dim
;
constexpr
int
missing_offset
=
Dim
+
sizeof
...(
args
);
this
->
push_back
(
std
::
get
<
Is
>
(
position
)...,
args
...,
std
::
tuple_element_t
<
missing_offset
+
Js
,
vt
>
{}...);
}
/**
* \brief Get size to send the container
...
...
Src/Utils/variadic_container.hpp
View file @
16b8be1f
...
...
@@ -8,6 +8,7 @@
#include <stdexcept>
#include <tuple>
#include <type_traits>
#include <utility>
#include "FOstreamTuple.hpp"
...
...
@@ -191,7 +192,7 @@ public:
this
->
assign
(
first
,
last
);
}
variadic_vector_impl
(
const
variadic_vector_impl
&
other
)
{
variadic_vector_impl
(
variadic_vector_impl
&
other
)
{
this
->
assign
(
other
.
begin
(),
other
.
end
());
}
...
...
@@ -924,7 +925,7 @@ private:
*/
template
<
typename
...
Values
>
iterator
insert_impl
(
const_
iterator
pos
,
iterator
pos
,
size_type
count
,
Values
&&
...
values
)
{
...
...
@@ -956,7 +957,7 @@ public:
* \return An iterator pointing to the inserted element
*/
template
<
typename
ValueTuple
>
iterator
insert
(
const_
iterator
pos
,
ValueTuple
&&
values
)
{
iterator
insert
(
iterator
pos
,
ValueTuple
&&
values
)
{
static_assert
(
std
::
tuple_size
<
std
::
decay_t
<
ValueTuple
>>::
value
==
sizeof
...(
Indices
),
"Given tuple does not have the right size"
);
return
insert_impl
(
pos
,
1
,
std
::
get
<
Indices
>
(
std
::
forward
<
ValueTuple
>
(
values
))...);
...
...
@@ -973,7 +974,7 @@ public:
* \return An iterator pointing to the first inserted element
*/
template
<
typename
ValueTuple
>
iterator
insert
(
const_
iterator
pos
,
size_type
count
,
ValueTuple
&&
values
)
{
iterator
insert
(
iterator
pos
,
size_type
count
,
ValueTuple
&&
values
)
{
static_assert
(
std
::
tuple_size
<
std
::
decay_t
<
ValueTuple
>>::
value
==
sizeof
...(
Indices
),
"Given tuple does not have the right size"
);
return
insert_impl
(
pos
,
count
,
std
::
get
<
Indices
>
(
std
::
forward
<
ValueTuple
>
(
values
))...);
...
...
@@ -1036,7 +1037,7 @@ public:
template
<
class
TupleIterator
,
typename
std
::
enable_if
<
is_tuple_get_like
<
TupleIterator
>
::
value
,
char
>::
type
=
0
>
iterator
insert
(
const_
iterator
pos
,
TupleIterator
first
,
TupleIterator
last
)
{
iterator
insert
(
iterator
pos
,
TupleIterator
first
,
TupleIterator
last
)
{
size_type
pos_idx
=
pos
-
this
->
begin
();
size_type
count
=
last
-
first
;
...
...
@@ -1074,7 +1075,7 @@ public:
template
<
class
ValueIterator
,
typename
std
::
enable_if
<!
is_tuple_get_like
<
ValueIterator
>
::
value
,
char
>::
type
=
0
>
iterator
insert
(
const_
iterator
pos
,
ValueIterator
first
,
ValueIterator
last
)
{
iterator
insert
(
iterator
pos
,
ValueIterator
first
,
ValueIterator
last
)
{
auto
ret_offset
=
pos
-
this
->
cbegin
();
while
(
first
!=
last
)
{
insert
(
pos
,
*
first
);
...
...
@@ -1183,7 +1184,7 @@ public:
*
* \param values Values to insert into the sub-arrays
*/
void
push_back
(
const
Types
&
...
values
)
{
void
push_back
(
Types
const
&
...
values
)
{
this
->
insert_impl
(
this
->
end
(),
1
,
values
...);
}
...
...
@@ -1291,25 +1292,26 @@ public:
template
<
typename
...
Types
,
std
::
size_t
...
Indices
>
class
variadic_vector_iterator
<
std
::
tuple
<
Types
...
>
,
inria
::
index_sequence
<
Indices
...
>>
class
variadic_vector_iterator
<
std
::
tuple
<
Types
...
>
,
inria
::
index_sequence
<
Indices
...
>
>
:
public
std
::
tuple
<
Types
*
...
>
{
using
base_t
=
std
::
tuple
<
Types
*
...
>
;
using
value_tuple
=
std
::
tuple
<
typename
std
::
remove_const
<
Types
>::
type
...
>
;
using
base_t
=
std
::
tuple
<
Types
*
...
>
;
using
value_tuple
=
std
::
tuple
<
typename
std
::
remove_const
<
Types
>::
type
...
>
;
using
const_value_tuple
=
std
::
tuple
<
const
Types
...
>
;
public:
using
difference_type
=
std
::
ptrdiff_t
;
using
value_type
=
std
::
tuple
<
Types
...
>
;
using
reference
=
std
::
tuple
<
Types
&
...
>
;
using
pointer
=
void
;
using
difference_type
=
std
::
ptrdiff_t
;
using
value_type
=
std
::
tuple
<
Types
...
>
;
using
reference
=
std
::
tuple
<
Types
&
...
>
;
using
pointer
=
void
;
using
iterator_category
=
std
::
random_access_iterator_tag
;
using
pointer_tuple
=
std
::
tuple
<
Types
*
...
>
;
using
base_seq
=
inria
::
index_sequence
<
Indices
...
>
;
using
pointer_tuple
=
std
::
tuple
<
Types
*
...
>
;
using
typename
base_t
::
tuple
;
variadic_vector_iterator
(
base_t
tup_in
)
:
base_t
(
tup_in
){}
variadic_vector_iterator
(
base_t
tup_in
,
base_seq
t
)
:
base_t
(
tup_in
){}
/*
*/
// variadic_vector_iterator(base_t tup_in):(tup_in){}
...
...
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