This repository has been archived by the owner on Nov 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gpu' of github.com:OP2/PyOP2 into gpu
- Loading branch information
Showing
7 changed files
with
263 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
class _not_implemented: # noqa | ||
"""Not Implemented""" | ||
|
||
|
||
class AbstractComputeBackend: | ||
""" | ||
Abstract class to record all the backend specific implementation of | ||
:mod:`pyop2`'s data structures. | ||
""" | ||
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() | ||
|
||
def _getattr_(self, key): | ||
val = super(AbstractComputeBackend, self)._getattr_(key) | ||
if isinstance(val, _not_implemented): | ||
raise NotImplementedError("'{}' is not implemented for backend" | ||
" '{}'.".format(val, self.__name__)) | ||
return val |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.