cython
ファイルのコンパイルを並行して実行したいと思います。
そこで、Cython.Build
ソース ファイルを調べたところ、次のcythonize
関数のシグネチャが見つかりました。
def cythonize(module_list, exclude=None, nthreads=0, aliases=None,
quiet=False, force=False, language=None,
exclude_failures=False, **options):
そして、cythonizenthreads
オプションに関する次のコメント:
"For parallel compilation, set the 'nthreads' option to the number of
concurrent builds."
setup.py
そのため、次のように、ファイルでこのオプションを使用しようとしました。
from setuptools import setup
from Cython.Build import cythonize
from Cython.Distutils.extension import Extension
EXTENSIONS = [Extension(...)
...
Extension(...)]
setup(name='...',
...
ext_modules=cythonize(EXTENSIONS, nthreads=8),
...)
しかし、私の.pyx
ファイルはまだ 1 つのスレッドを使用して順次コンパイルされています。
nthreads
ここで間違っていることと、オプションを使用してcythonize
コンパイルを並行して実行する方法がわかりませんか?