Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
solverstack
ScalFMM
Commits
a4468312
Commit
a4468312
authored
8 years ago
by
Quentin Khan
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup comments in variadic_vector
parent
81989f6f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Src/Utils/variadic_container.hpp
+11
-8
11 additions, 8 deletions
Src/Utils/variadic_container.hpp
with
11 additions
and
8 deletions
Src/Utils/variadic_container.hpp
+
11
−
8
View file @
a4468312
...
...
@@ -18,8 +18,7 @@ struct noop_t {
noop_t
(
const
Types
&
...)
{}
};
/// Check if allocator has a special behaviour when allocating memory for
/// contiguous multiple type arrays
/// Check whether allocator can rebind to multiple type at the same time
template
<
typename
T
,
typename
...
Types
>
class
check_multi_allocator_rebind
{
...
...
@@ -135,8 +134,8 @@ public:
* \return The new variadic_vector
*/
variadic_vector_impl
(
size_type
count
,
const
value_type
&
value
,
const
allocator_type_tuple
&
alloc
=
allocator_type_tuple
())
const
value_type
&
value
,
const
allocator_type_tuple
&
alloc
=
allocator_type_tuple
())
:
_allocator_tuple
(
alloc
)
{
this
->
reserve
(
count
);
...
...
@@ -157,7 +156,7 @@ public:
this
->
reserve
(
count
);
this
->
_size
=
count
;
for
(
size_type
i
=
0
;
i
<
count
;
++
i
)
{
noop_t
(
(
std
::
get
<
Indices
>
(
_allocator_tuple
).
construct
(
std
::
get
<
Indices
>
(
_data_tuple
)
+
i
),
0
)...
)
;
noop_t
{
(
std
::
get
<
Indices
>
(
_allocator_tuple
).
construct
(
std
::
get
<
Indices
>
(
_data_tuple
)
+
i
),
0
)...
}
;
}
}
...
...
@@ -584,7 +583,10 @@ private:
*
* \note Only used when the Allocator is not a multi-allocator.
*
* This function works recursively. This overload will set the J_th element
* This function works recursively. The first call is assumed t
*
*
* This overload will set the J_th element
* of `data_tuple` to `data_ptr` and will the advance it to the end of the
* sub-array for a subsequent call.
*
...
...
@@ -994,6 +996,7 @@ private:
return
p
-
count
;
}
/** Trait that checks whether a type is a tuple of iterators or not */
template
<
class
T
>
struct
is_tuple_get_like
{
template
<
class
U
,
class
=
decltype
(
std
::
get
<
0
>(
std
::
declval
<
U
>
()))
>
...
...
@@ -1006,7 +1009,7 @@ public:
/** \brief Insert elements from a range
*
* \tparam TupleIterator Iterator type convertible to a tuple of
element
s
* \tparam TupleIterator Iterator type convertible to a tuple of
iterator
s
* that are convertible to the elements of #value_type.
*
* \param pos Position before which to insert values
...
...
@@ -1255,7 +1258,7 @@ public:
* \return The moved iterator
*/
variadic_vector_iterator
&
operator
+=
(
difference_type
n
)
{
noop_t
(
(
std
::
get
<
Indices
>
(
*
this
)
+=
n
)...
)
;
noop_t
{
(
std
::
get
<
Indices
>
(
*
this
)
+=
n
)...
}
;
return
(
*
this
);
}
...
...
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