Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
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
Container Registry
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
Backofen, Rainer
amdis
Commits
e5d797df
Commit
e5d797df
authored
15 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
Only small modifications.
parent
6ad371c1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AMDiS/src/CreatorMap.cc
+3
-6
3 additions, 6 deletions
AMDiS/src/CreatorMap.cc
AMDiS/src/CreatorMap.h
+13
-22
13 additions, 22 deletions
AMDiS/src/CreatorMap.h
AMDiS/src/CreatorMap.hh
+1
-5
1 addition, 5 deletions
AMDiS/src/CreatorMap.hh
with
17 additions
and
33 deletions
AMDiS/src/CreatorMap.cc
+
3
−
6
View file @
e5d797df
...
...
@@ -50,18 +50,15 @@ namespace AMDiS {
creator
=
NEW
DiagonalPreconditioner
::
Creator
;
addCreator
(
"diag"
,
creator
);
creator
=
NEW
IdentityPreconditioner
::
Creator
;
addCreator
(
"no"
,
creator
);
creator
=
NEW
ILUPreconditioner
::
Creator
;
addCreator
(
"ilu"
,
creator
);
creator
=
NEW
ICPreconditioner
::
Creator
;
addCreator
(
"ic"
,
creator
);
}
creator
=
NEW
IdentityPreconditioner
::
Creator
;
addCreator
(
"no"
,
creator
);
}
#if 0
template<>
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/CreatorMap.h
+
13
−
22
View file @
e5d797df
...
...
@@ -42,9 +42,7 @@ namespace AMDiS {
class
CreatorMap
{
public:
/** \brief
* Adds a new creator together with the given key to the map.
*/
/// Adds a new creator together with the given key to the map.
static
void
addCreator
(
std
::
string
key
,
CreatorInterface
<
BaseClass
>*
creator
)
{
FUNCNAME
(
"CreatorMap::addCreator()"
);
...
...
@@ -54,9 +52,7 @@ namespace AMDiS {
creatorMap
[
key
]
=
creator
;
}
/** \brief
* Creates a object of the type corresponding to key.
*/
/// Creates a object of the type corresponding to key.
static
CreatorInterface
<
BaseClass
>*
getCreator
(
std
::
string
key
)
{
FUNCNAME
(
"CreatorMap::getCreator()"
);
init
();
...
...
@@ -69,24 +65,19 @@ namespace AMDiS {
static
void
addDefaultCreators
();
protected
:
/** \brief
* Constructor is protected because derived maps should be singleton.
*/
static
void
init
()
{
if
(
!
initialized
)
{
initialized
=
true
;
NullCreator
<
BaseClass
>
*
nullCreator
=
new
NullCreator
<
BaseClass
>
;
// addCreator("no", nullCreator);
addCreator
(
"0"
,
nullCreator
);
addDefaultCreators
();
}
};
protected
:
/// Constructor is protected because derived maps should be singleton.
static
void
init
()
{
if
(
!
initialized
)
{
initialized
=
true
;
NullCreator
<
BaseClass
>
*
nullCreator
=
new
NullCreator
<
BaseClass
>
;
addCreator
(
"0"
,
nullCreator
);
addDefaultCreators
();
}
}
protected
:
/** \brief
* STL map containing the pairs of keys and creators.
*/
/// STL map containing the pairs of keys and creators.
static
std
::
map
<
std
::
string
,
CreatorInterface
<
BaseClass
>*
>
creatorMap
;
static
bool
initialized
;
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/CreatorMap.hh
+
1
−
5
View file @
e5d797df
...
...
@@ -8,11 +8,7 @@ namespace AMDiS {
{
typename
std
::
map
<
std
::
string
,
CreatorInterface
<
BaseClass
>*
>::
iterator
it
;
for
(
it
=
creatorMap
.
begin
();
it
!=
creatorMap
.
end
();
++
it
)
{
for
(
it
=
creatorMap
.
begin
();
it
!=
creatorMap
.
end
();
++
it
)
DELETE
it
->
second
;
}
}
}
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