diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-09-25 18:24:57 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-09-25 18:42:16 +0200 |
commit | 03ff113ac48f21956247b164a83000b5f6ab311d (patch) | |
tree | e0f98656f13716b42898c6aefd8abbcc7353d4bc /python/astra/astra.py | |
parent | bd5abc1dd5162ead6e0d19fb8f575bc61fcbc6c0 (diff) | |
download | astra-03ff113ac48f21956247b164a83000b5f6ab311d.tar.gz astra-03ff113ac48f21956247b164a83000b5f6ab311d.tar.bz2 astra-03ff113ac48f21956247b164a83000b5f6ab311d.tar.xz astra-03ff113ac48f21956247b164a83000b5f6ab311d.zip |
Add support for checking features at run-time
Diffstat (limited to 'python/astra/astra.py')
-rw-r--r-- | python/astra/astra.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/python/astra/astra.py b/python/astra/astra.py index ef46db1..e74d29a 100644 --- a/python/astra/astra.py +++ b/python/astra/astra.py @@ -54,6 +54,20 @@ def get_gpu_info(idx=-1): """ return a.get_gpu_info(idx) +def has_feature(feature): + """Check a feature flag. + + These are used to check if certain functionality has been + enabled at compile time, if new functionality is present, or if + a backward-incompatible change is present. + + See include/astra/Features.h for a list. + + :param feature: The name of the feature + :type feature: :class:`str` + :returns: :class:`bool` -- The presence of the feature + """ + return a.has_feature(feature) def delete(ids): """Delete an astra object. |