在哪里可以找到释放GIL的numpy函数列表? [英] Where can I find a list of numpy functions which release the GIL?
本文介绍了在哪里可以找到释放GIL的numpy函数列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我发现了几个SO问题,以一种或另一种方式询问此问题,但实际上没有一个给出列表或引用一个问题.
I have found several SO questions asking about this in one way or another, but none of them actually either give a list or refer to one.
此问题是指
This question refers to a wiki page, but while the wiki page talks about the GIL and multi-threading, it doesn't give a list of GIL releasing functions.
此邮件列表帖子指示找出答案的唯一方法是读取numpy源代码.真的吗?
This mailing list post indicates that the only way to find out is to read the numpy source. Really?
推荐答案
不能保证捕获所有内容,但我只是跑了:
It's not guaranteed to catch everything, but I just ran:
git grep nogil
在我的numpy存储库克隆中.它在2个文件中显示了82种用法:
in my clone of the numpy repository. It turns up 82 usages in 2 files:
-
random/mtrand/mtrand.pyx
-
random/mtrand/numpy.pxd
random/mtrand/mtrand.pyx
random/mtrand/numpy.pxd
这篇关于在哪里可以找到释放GIL的numpy函数列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文