Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
simso
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cec32de9
authored
May 21, 2015
by
Maxime Chéramy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cls argument in SchedulerInfo.
parent
5e3ed0dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
simso/core/Scheduler.py
+8
-8
No files found.
simso/core/Scheduler.py
View file @
cec32de9
...
@@ -15,7 +15,7 @@ class SchedulerInfo(object):
...
@@ -15,7 +15,7 @@ class SchedulerInfo(object):
SchedulerInfo groups the data that characterize a Scheduler (such as the
SchedulerInfo groups the data that characterize a Scheduler (such as the
scheduling overhead) and do the dynamic loading of the scheduler.
scheduling overhead) and do the dynamic loading of the scheduler.
"""
"""
def
__init__
(
self
,
name
=
''
,
cls
=
None
,
overhead
=
0
,
overhead_activate
=
0
,
def
__init__
(
self
,
name
=
''
,
overhead
=
0
,
overhead_activate
=
0
,
overhead_terminate
=
0
,
fields
=
None
):
overhead_terminate
=
0
,
fields
=
None
):
"""
"""
Args:
Args:
...
@@ -27,7 +27,6 @@ class SchedulerInfo(object):
...
@@ -27,7 +27,6 @@ class SchedulerInfo(object):
"""
"""
self
.
_name
=
name
self
.
_name
=
name
self
.
_filename
=
None
self
.
_filename
=
None
self
.
_cls
=
cls
self
.
overhead
=
overhead
self
.
overhead
=
overhead
self
.
overhead_activate
=
overhead_activate
self
.
overhead_activate
=
overhead_activate
self
.
overhead_terminate
=
overhead_terminate
self
.
overhead_terminate
=
overhead_terminate
...
@@ -86,14 +85,14 @@ class SchedulerInfo(object):
...
@@ -86,14 +85,14 @@ class SchedulerInfo(object):
fp
,
pathname
,
description
=
imp
.
find_module
(
name
,
[
path
])
fp
,
pathname
,
description
=
imp
.
find_module
(
name
,
[
path
])
if
path
not
in
sys
.
path
:
if
path
not
in
sys
.
path
:
sys
.
path
.
append
(
path
)
sys
.
path
.
append
(
path
)
self
.
_cl
s
=
getattr
(
imp
.
load_module
(
name
,
fp
,
pathname
,
cla
s
=
getattr
(
imp
.
load_module
(
name
,
fp
,
pathname
,
description
),
name
)
description
),
name
)
fp
.
close
()
fp
.
close
()
return
clas
except
ImportError
as
e
:
except
ImportError
as
e
:
print
(
"ImportError: "
,
e
)
print
(
"ImportError: "
,
e
)
print
(
"name: "
,
name
,
"path: "
,
path
)
print
(
"name: "
,
name
,
"path: "
,
path
)
return
None
return
self
.
_cls
def
instantiate
(
self
,
model
):
def
instantiate
(
self
,
model
):
"""
"""
...
@@ -103,8 +102,9 @@ class SchedulerInfo(object):
...
@@ -103,8 +102,9 @@ class SchedulerInfo(object):
- `model`: The :class:`Model <simso.core.Model.Model>` object
\
- `model`: The :class:`Model <simso.core.Model.Model>` object
\
that is passed to the constructor.
that is passed to the constructor.
"""
"""
cls
=
self
.
get_cls
()
clas
=
self
.
get_cls
()
return
cls
(
model
,
self
)
if
clas
:
return
clas
(
model
,
self
)
class
Scheduler
(
object
):
class
Scheduler
(
object
):
...
...
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