Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
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
Timo Koch
dune-common
Commits
81a9a2f5
Commit
81a9a2f5
authored
9 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
Use std::array instead of 'array'
parent
e3eb585c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
dune/common/arraylist.hh
+4
-4
4 additions, 4 deletions
dune/common/arraylist.hh
dune/common/fmatrix.hh
+2
-2
2 additions, 2 deletions
dune/common/fmatrix.hh
dune/common/fvector.hh
+2
-2
2 additions, 2 deletions
dune/common/fvector.hh
dune/common/parametertree.hh
+3
-3
3 additions, 3 deletions
dune/common/parametertree.hh
with
11 additions
and
11 deletions
dune/common/arraylist.hh
+
4
−
4
View file @
81a9a2f5
...
@@ -194,13 +194,13 @@ namespace Dune
...
@@ -194,13 +194,13 @@ namespace Dune
/**
/**
* @brief The allocators for the smart pointer.
* @brief The allocators for the smart pointer.
*/
*/
typedef
typename
A
::
template
rebind
<
shared_ptr
<
array
<
MemberType
,
chunkSize_
>
>
>::
other
typedef
typename
A
::
template
rebind
<
shared_ptr
<
std
::
array
<
MemberType
,
chunkSize_
>
>
>::
other
SmartPointerAllocator
;
SmartPointerAllocator
;
/**
/**
* @brief The allocator for the fixed array.
* @brief The allocator for the fixed array.
*/
*/
typedef
typename
A
::
template
rebind
<
array
<
MemberType
,
chunkSize_
>
>::
other
typedef
typename
A
::
template
rebind
<
std
::
array
<
MemberType
,
chunkSize_
>
>::
other
ArrayAllocator
;
ArrayAllocator
;
/**
/**
...
@@ -210,7 +210,7 @@ namespace Dune
...
@@ -210,7 +210,7 @@ namespace Dune
friend
class
ConstArrayListIterator
<
T
,
N
,
A
>
;
friend
class
ConstArrayListIterator
<
T
,
N
,
A
>
;
/** @brief the data chunks of our list. */
/** @brief the data chunks of our list. */
std
::
vector
<
shared_ptr
<
array
<
MemberType
,
chunkSize_
>
>
,
std
::
vector
<
shared_ptr
<
std
::
array
<
MemberType
,
chunkSize_
>
>
,
SmartPointerAllocator
>
chunks_
;
SmartPointerAllocator
>
chunks_
;
/** @brief The current data capacity.
/** @brief The current data capacity.
* This is the capacity that the list could have theoretically
* This is the capacity that the list could have theoretically
...
@@ -493,7 +493,7 @@ namespace Dune
...
@@ -493,7 +493,7 @@ namespace Dune
size_t
index
=
start_
+
size_
;
size_t
index
=
start_
+
size_
;
if
(
index
==
capacity_
)
if
(
index
==
capacity_
)
{
{
chunks_
.
push_back
(
shared_ptr
<
array
<
MemberType
,
chunkSize_
>
>
(
new
array
<
MemberType
,
chunkSize_
>
()));
chunks_
.
push_back
(
shared_ptr
<
std
::
array
<
MemberType
,
chunkSize_
>
>
(
new
std
::
array
<
MemberType
,
chunkSize_
>
()));
capacity_
+=
chunkSize_
;
capacity_
+=
chunkSize_
;
}
}
elementAt
(
index
)
=
entry
;
elementAt
(
index
)
=
entry
;
...
...
This diff is collapsed.
Click to expand it.
dune/common/fmatrix.hh
+
2
−
2
View file @
81a9a2f5
...
@@ -42,7 +42,7 @@ namespace Dune
...
@@ -42,7 +42,7 @@ namespace Dune
typedef
row_type
&
row_reference
;
typedef
row_type
&
row_reference
;
typedef
const
row_type
&
const_row_reference
;
typedef
const
row_type
&
const_row_reference
;
typedef
Dune
::
array
<
row_type
,
ROWS
>
container_type
;
typedef
std
::
array
<
row_type
,
ROWS
>
container_type
;
typedef
K
value_type
;
typedef
K
value_type
;
typedef
typename
container_type
::
size_type
size_type
;
typedef
typename
container_type
::
size_type
size_type
;
};
};
...
@@ -65,7 +65,7 @@ namespace Dune
...
@@ -65,7 +65,7 @@ namespace Dune
template
<
class
K
,
int
ROWS
,
int
COLS
>
template
<
class
K
,
int
ROWS
,
int
COLS
>
class
FieldMatrix
:
public
DenseMatrix
<
FieldMatrix
<
K
,
ROWS
,
COLS
>
>
class
FieldMatrix
:
public
DenseMatrix
<
FieldMatrix
<
K
,
ROWS
,
COLS
>
>
{
{
Dune
::
array
<
FieldVector
<
K
,
COLS
>
,
ROWS
>
_data
;
std
::
array
<
FieldVector
<
K
,
COLS
>
,
ROWS
>
_data
;
typedef
DenseMatrix
<
FieldMatrix
<
K
,
ROWS
,
COLS
>
>
Base
;
typedef
DenseMatrix
<
FieldMatrix
<
K
,
ROWS
,
COLS
>
>
Base
;
public:
public:
...
...
This diff is collapsed.
Click to expand it.
dune/common/fvector.hh
+
2
−
2
View file @
81a9a2f5
...
@@ -38,7 +38,7 @@ namespace Dune {
...
@@ -38,7 +38,7 @@ namespace Dune {
struct
DenseMatVecTraits
<
FieldVector
<
K
,
SIZE
>
>
struct
DenseMatVecTraits
<
FieldVector
<
K
,
SIZE
>
>
{
{
typedef
FieldVector
<
K
,
SIZE
>
derived_type
;
typedef
FieldVector
<
K
,
SIZE
>
derived_type
;
typedef
Dune
::
array
<
K
,
SIZE
>
container_type
;
typedef
std
::
array
<
K
,
SIZE
>
container_type
;
typedef
K
value_type
;
typedef
K
value_type
;
typedef
typename
container_type
::
size_type
size_type
;
typedef
typename
container_type
::
size_type
size_type
;
};
};
...
@@ -92,7 +92,7 @@ namespace Dune {
...
@@ -92,7 +92,7 @@ namespace Dune {
class
FieldVector
:
class
FieldVector
:
public
DenseVector
<
FieldVector
<
K
,
SIZE
>
>
public
DenseVector
<
FieldVector
<
K
,
SIZE
>
>
{
{
Dune
::
array
<
K
,
SIZE
>
_data
;
std
::
array
<
K
,
SIZE
>
_data
;
typedef
DenseVector
<
FieldVector
<
K
,
SIZE
>
>
Base
;
typedef
DenseVector
<
FieldVector
<
K
,
SIZE
>
>
Base
;
public:
public:
//! export size
//! export size
...
...
This diff is collapsed.
Click to expand it.
dune/common/parametertree.hh
+
3
−
3
View file @
81a9a2f5
...
@@ -308,10 +308,10 @@ namespace Dune {
...
@@ -308,10 +308,10 @@ namespace Dune {
};
};
template
<
typename
T
,
std
::
size_t
n
>
template
<
typename
T
,
std
::
size_t
n
>
struct
ParameterTree
::
Parser
<
array
<
T
,
n
>
>
{
struct
ParameterTree
::
Parser
<
std
::
array
<
T
,
n
>
>
{
static
array
<
T
,
n
>
static
std
::
array
<
T
,
n
>
parse
(
const
std
::
string
&
str
)
{
parse
(
const
std
::
string
&
str
)
{
array
<
T
,
n
>
val
;
std
::
array
<
T
,
n
>
val
;
parseRange
(
str
,
val
.
begin
(),
val
.
end
());
parseRange
(
str
,
val
.
begin
(),
val
.
end
());
return
val
;
return
val
;
}
}
...
...
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