提交 6a9459cf authored 作者: Frederic's avatar Frederic

pep8

上级 0f86ecd9
...@@ -817,9 +817,9 @@ class CLinker(link.Linker): ...@@ -817,9 +817,9 @@ class CLinker(link.Linker):
Input Signature Input Signature
--------------- ---------------
Each input signature is a tuple with an element for each input to the corresponding Each input signature is a tuple with an element for each input
Apply node. to the corresponding Apply node. Each element identifies the
Each element identifies the type of the node input, and the nature of that input in the type of the node input, and the nature of that input in the
graph. graph.
The nature of a typical variable is encoded by integer pairs ``((a,b),c)``: The nature of a typical variable is encoded by integer pairs ``((a,b),c)``:
...@@ -827,25 +827,31 @@ class CLinker(link.Linker): ...@@ -827,25 +827,31 @@ class CLinker(link.Linker):
``b`` is the index of the variable in the owner's output list. ``b`` is the index of the variable in the owner's output list.
``c`` is a flag indicating whether the variable is in the no_recycling set. ``c`` is a flag indicating whether the variable is in the no_recycling set.
If a variable is also a graph output, then its position in the outputs list is also If a variable is also a graph output, then its position in the
bundled with this tuple (after the b). outputs list is also bundled with this tuple (after the b).
The nature of a Constant instance is defined as its signature, together with
two integers: the topological position of the first Apply using that Constant instance, The nature of a Constant instance is defined as its signature,
and the lowest index into that Apply's inputs that refers to that Constant. (These two together with two integers: the topological position of the
integers are a surrogate for the id() of the Constant. The integers are important first Apply using that Constant instance, and the lowest index
because merge-able constants have the same signature, but require separate containers into that Apply's inputs that refers to that Constant. (These
in C code.) The membership in no_recycling is also included in the signature. two integers are a surrogate for the id() of the Constant.
The integers are important because merge-able constants have
the same signature, but require separate containers in C
code.) The membership in no_recycling is also included in the
signature.
Output Signature Output Signature
---------------- ----------------
The outputs of a node are entirely determined by the node's Op and the nature of the The outputs of a node are entirely determined by the node's Op
inputs, but the set of outputs that may be re-used by the computation (the elements of and the nature of the inputs, but the set of outputs that may
be re-used by the computation (the elements of
self.no_recycling) can affect the code that is generated. self.no_recycling) can affect the code that is generated.
The format of each Op's output signature is simply a list of booleans, indicating The format of each Op's output signature is simply a list of
whether each output is in the no_recycling set. booleans, indicating whether each output is in the
no_recycling set.
""" """
return self.cmodule_key_(self.env, self.no_recycling, return self.cmodule_key_(self.env, self.no_recycling,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论