Skip to content
Snippets Groups Projects
Commit 25119c34 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Implement a backend selecting mechanism

parent a302cf4f
No related branches found
No related tags found
No related merge requests found
from __future__ import absolute_import
from dune.perftool.generation.backend import (backend,
get_backend,
)
from dune.perftool.generation.counter import get_counter
from dune.perftool.generation.cache import (cached,
......
""" Some decorators to implement a backend selection mechanism """
_backend_mapping = {}
def backend(name):
def _dec(func):
assert(name not in _backend_mapping)
_backend_mapping[name] = func
return func
return _dec
def get_backend(name):
return _backend_mapping[name]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment