Last change
on this file since 804 was
744,
checked in by dubos, 6 years ago
|
devel : make_icosa option for mixed precision
|
File size:
676 bytes
|
Rev | Line | |
---|
[615] | 1 | from distutils.core import setup |
---|
[626] | 2 | from distutils.extension import Extension |
---|
[615] | 3 | from Cython.Build import cythonize |
---|
[744] | 4 | |
---|
| 5 | from ctypes import cdll, c_bool |
---|
| 6 | libicosa = cdll.LoadLibrary('libicosa.so') |
---|
| 7 | mixed_prec=c_bool.in_dll(libicosa, 'mixed_precision').value |
---|
| 8 | |
---|
| 9 | if mixed_prec: |
---|
| 10 | extra_flags=["-DCPP_MIXED_PREC"] |
---|
| 11 | else: |
---|
| 12 | extra_flags=None |
---|
| 13 | |
---|
[615] | 14 | setup( name = "DYNAMICO kernels for unstructured mesh", |
---|
[626] | 15 | ext_modules = cythonize([ |
---|
[694] | 16 | Extension("cxios",["cxios.pyx"],libraries=["xios"]), |
---|
[744] | 17 | Extension("unstructured",["unstructured.pyx"],libraries=["icosa","xios"], extra_compile_args=extra_flags) |
---|
| 18 | ], compile_time_env={'CPP_MIXED_PREC': mixed_prec} ) |
---|
[626] | 19 | ) |
---|
Note: See
TracBrowser
for help on using the repository browser.