-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEvalBase.py
More file actions
executable file
·36 lines (29 loc) · 960 Bytes
/
EvalBase.py
File metadata and controls
executable file
·36 lines (29 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This file is part of GenMap and released under the MIT License, see LICENSE.
# Author: Takuya Kojima
from abc import ABCMeta, abstractmethod
class EvalBase(metaclass=ABCMeta):
@staticmethod
@abstractmethod
def eval(CGRA, app, sim_params, individual, **info):
"""Return mapping width.
Args:
CGRA (PEArrayModel): A model of the CGRA
app (Application): An application to be optimized
sim_params (SimParameters): parameters for some simulations
individual (Individual): An individual to be evaluated
Returns:
float or int: evaluated value
"""
pass
@staticmethod
@abstractmethod
def isMinimize():
"""Returns whether this objective should be minimize.
"""
pass
@staticmethod
@abstractmethod
def name():
"""Returns the evaluation name
"""
pass