Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pytensor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
testgroup
pytensor
Commits
2ba62640
提交
2ba62640
authored
7月 18, 2015
作者:
Arnaud Bergeron
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add documentation on the new optional c_compiler parameter.
上级
0681cf5a
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
60 行增加
和
16 行删除
+60
-16
cop.txt
doc/extending/cop.txt
+40
-10
ctype.txt
doc/extending/ctype.txt
+20
-6
没有找到文件。
doc/extending/cop.txt
浏览文件 @
2ba62640
...
...
@@ -57,39 +57,63 @@ There are less methods to define for an Op than for a Type:
*Default:* The default behavior is to do nothing.
.. method:: c_headers()
.. method:: c_headers(
[c_compiler]
)
Returns a list of headers to include in the file. 'Python.h' is
included by default so you don't need to specify it. Also all
of the header required by the Types involved (inputs and
of the header
s
required by the Types involved (inputs and
outputs) will also be included.
.. method:: c_header_dirs()
The `c_compiler` [#2v]_ parameter is the C compiler that will
be used to compile the code for the node. You may get multiple
calls with different C compilers.
.. method:: c_header_dirs([c_compiler])
Returns a list of directories to search for headers (arguments
to -I).
.. method:: c_libraries()
The `c_compiler` [#2v]_ parameter is the C compiler that will
be used to compile the code for the node. You may get multiple
calls with different C compilers.
.. method:: c_libraries([c_compiler])
Returns a list of library names that your op needs to link to.
All ops are automatically linked with 'python' and the
libraries their types require. (arguments to -l)
.. method:: c_lib_dirs()
The `c_compiler` [#2v]_ parameter is the C compiler that will
be used to compile the code for the node. You may get multiple
calls with different C compilers.
.. method:: c_lib_dirs([c_compiler])
Returns a list of directory to search for libraries (arguments
to -L).
.. method:: c_compile_args()
The `c_compiler` [#2v]_ parameter is the C compiler that will
be used to compile the code for the node. You may get multiple
calls with different C compilers.
.. method:: c_compile_args([c_compiler])
Allows to specify additional arbitrary arguments to
g++. This
is not usually required.
Allows to specify additional arbitrary arguments to
the C
compiler. This
is not usually required.
.. method:: c_no_compile_args()
The `c_compiler` [#2v]_ parameter is the C compiler that will
be used to compile the code for the node. You may get multiple
calls with different C compilers.
Returns a list of g++ arguments that are forbidden when
.. method:: c_no_compile_args([c_compiler])
Returns a list of C compiler arguments that are forbidden when
compiling this Op.
The `c_compiler` [#2v]_ parameter is the C compiler that will
be used to compile the code for the node. You may get multiple
calls with different C compilers.
.. method:: c_init_code()
Allows you to specify code that will be executed once when the
...
...
@@ -245,6 +269,12 @@ In a nutshell, ``input_names`` and ``output_names`` parameterize the
names of the inputs your operation needs to use and the outputs it
needs to put variables into. But this will be clear with the examples.
.. rubric:: Footnotes
.. [#2v] There are actually two versions of this method one with a
`c_compiler` parameter and one without. The calling code will
try the version with c_compiler and try the version without
if it does not work.
Defining the methods
====================
...
...
doc/extending/ctype.txt
浏览文件 @
2ba62640
...
...
@@ -78,18 +78,32 @@ the most important ones:
When we are done using the data, clean up whatever we allocated and
decrease the appropriate reference counts.
.. method:: c_headers()
c_libraries()
c_header_dirs()
c_lib_dirs()
.. method:: c_headers(
[c_compiler]
)
c_libraries(
[c_compiler]
)
c_header_dirs(
[c_compiler]
)
c_lib_dirs(
[c_compiler]
)
Allows you to specify headers, libraries and associated directories.
.. method:: c_compile_args()
c_no_compile_args()
These methods have two versions, one with a `c_compiler`
argument and one without. The version with c_compiler is tried
first and if it doesn't work, the one without is.
The `c_compiler` argument is the C compiler that will be used
to compile the C code for the node that uses this type.
.. method:: c_compile_args([c_compiler])
c_no_compile_args([c_compiler])
Allows to specify special compiler arguments to add/exclude.
These methods have two versions, one with a `c_compiler`
argument and one without. The version with c_compiler is tried
first and if it doesn't work, the one without is.
The `c_compiler` argument is the C compiler that will be used
to compile the C code for the node that uses this type.
.. method:: c_init_code()
Allows you to specify code that will be executed once when the
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论