| 1 |
""" |
| 2 |
Runtime targets for code generation. |
| 3 |
""" |
| 4 |
|
| 5 |
# Register the base category before importing the indivial codegen targets with |
| 6 |
# their subcategories |
| 7 |
|
| 8 |
from brian2.core.preferences import prefs |
| 9 |
from brian2.utils.logger import get_logger |
| 10 |
|
| 11 |
prefs.register_preferences( |
| 12 |
"codegen.runtime", |
| 13 |
"Runtime codegen preferences (see subcategories for individual targets)", |
| 14 |
) |
| 15 |
|
| 16 |
logger = get_logger(__name__) |
| 17 |
|
| 18 |
from .numpy_rt import * |
| 19 |
|
| 20 |
try: |
| 21 |
from .cython_rt import * |
| 22 |
except ImportError: |
| 23 |
pass # todo: raise a warning? |
| 24 |
try: |
| 25 |
from .GSLcython_rt import * |
| 26 |
except ImportError: |
| 27 |
pass |