-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path__init__.py
More file actions
43 lines (37 loc) · 1.23 KB
/
__init__.py
File metadata and controls
43 lines (37 loc) · 1.23 KB
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
37
38
39
40
41
42
43
class _not_implemented: # noqa
"""Not Implemented"""
class AbstractComputeBackend:
"""
Abstract class to record all the backend specific implementation of
:mod:`pyop2`'s data structures.
"""
GlobalKernel = _not_implemented
Parloop = _not_implemented
Set = _not_implemented
ExtrudedSet = _not_implemented
MixedSet = _not_implemented
Subset = _not_implemented
DataSet = _not_implemented
MixedDataSet = _not_implemented
Map = _not_implemented
MixedMap = _not_implemented
Dat = _not_implemented
MixedDat = _not_implemented
DatView = _not_implemented
Mat = _not_implemented
Global = _not_implemented
GlobalDataSet = _not_implemented
PETScVecType = _not_implemented
def __getattribute__(self, key):
val = super().__getattribute__(key)
if val is _not_implemented:
raise NotImplementedError(f"'{val}' is not implemented for backend"
f" '{type(self).__name__}'.")
return val
def turn_on_offloading(self):
raise NotImplementedError()
def turn_off_offloading(self):
raise NotImplementedError()
@property
def cache_key(self):
raise NotImplementedError()