提交 32f0f6d6 authored 作者: Iban Harlouchet's avatar Iban Harlouchet

flake8 corrections for theano/gof/cc.py

上级 cdba68ad
...@@ -71,9 +71,9 @@ def get_persistent_module_cache(): ...@@ -71,9 +71,9 @@ def get_persistent_module_cache():
class CodeBlock: class CodeBlock:
""" """
WRITEME WRITEME
Represents a computation unit composed of declare, behavior, and cleanup. Represents a computation unit composed of declare, behavior, and cleanup.
The constructor initializes a L{CodeBlock} with templatized declare, The constructor initializes a L{CodeBlock} with templatized declare,
behavior and cleanup. The sub parameter will be used in the other behavior and cleanup. The sub parameter will be used in the other
arguments' templates. sub should contain a key called 'id' that maps to an arguments' templates. sub should contain a key called 'id' that maps to an
...@@ -81,7 +81,7 @@ class CodeBlock: ...@@ -81,7 +81,7 @@ class CodeBlock:
failure code and a label to jump to. It should also contain a key called failure code and a label to jump to. It should also contain a key called
'failure_var' that contains the name of the variable that contains the error 'failure_var' that contains the name of the variable that contains the error
code. code.
Parameters Parameters
---------- ----------
declare declare
...@@ -140,8 +140,8 @@ def failure_code_init(sub): ...@@ -140,8 +140,8 @@ def failure_code_init(sub):
def code_gen(blocks): def code_gen(blocks):
""" """
WRITEME WRITEME
From a list of L{CodeBlock} instances, returns a string From a list of L{CodeBlock} instances, returns a string
that executes them all in sequence. eg for C{(decl1, task1, that executes them all in sequence. eg for C{(decl1, task1,
cleanup1)} and C{(decl2, task2, cleanup2)} the returned string cleanup1)} and C{(decl2, task2, cleanup2)} the returned string
...@@ -452,14 +452,14 @@ def get_c_sync(r, name, sub): ...@@ -452,14 +452,14 @@ def get_c_sync(r, name, sub):
def apply_policy(policy, r, name, sub): def apply_policy(policy, r, name, sub):
""" """
WRITEME WRITEME
Parameters Parameters
---------- ----------
policy policy
List of functions that map a L{Variable} to a string, List of functions that map a L{Variable} to a string,
or a single such function. or a single such function.
r: L{Variable} r: L{Variable}
Returns Returns
------- -------
object object
...@@ -477,17 +477,17 @@ def apply_policy(policy, r, name, sub): ...@@ -477,17 +477,17 @@ def apply_policy(policy, r, name, sub):
def struct_variable_codeblocks(variable, policies, id, symbol_table, sub): def struct_variable_codeblocks(variable, policies, id, symbol_table, sub):
""" """
WRITEME WRITEME
Parameters Parameters
---------- ----------
variable : a Variable variable : a Variable
policies : a pair of tuples policies : a pair of tuples
(declare_policy, behavior_policy, cleanup_policy) -- at construction. (declare_policy, behavior_policy, cleanup_policy) -- at construction.
(declare_policy, behavior_policy, cleanup_policy)) -- at execution. (declare_policy, behavior_policy, cleanup_policy)) -- at execution.
The first list will produce an element of the 'struct_builders' argument The first list will produce an element of the 'struct_builders' argument
in struct_gen. The second list will produce an element of the 'blocks' in struct_gen. The second list will produce an element of the 'blocks'
argument in struct_gen. argument in struct_gen.
id id
The id assigned to this variable's task in the computation. The id assigned to this variable's task in the computation.
symbol_table symbol_table
A dict that maps variables to variable names. It is not read by this A dict that maps variables to variable names. It is not read by this
...@@ -1073,7 +1073,7 @@ class CLinker(link.Linker): ...@@ -1073,7 +1073,7 @@ class CLinker(link.Linker):
output_storage=None, keep_lock=False): output_storage=None, keep_lock=False):
""" """
WRITEME WRITEME
Compiles this linker's fgraph. Compiles this linker's fgraph.
Parameters Parameters
...@@ -1146,7 +1146,7 @@ class CLinker(link.Linker): ...@@ -1146,7 +1146,7 @@ class CLinker(link.Linker):
keep_lock=False): keep_lock=False):
""" """
WRITEME WRITEME
Compiles this linker's fgraph and returns a function to perform the Compiles this linker's fgraph and returns a function to perform the
computations, as well as lists of storage cells for both the inputs computations, as well as lists of storage cells for both the inputs
and outputs. and outputs.
...@@ -1611,7 +1611,7 @@ class _CThunk(object): ...@@ -1611,7 +1611,7 @@ class _CThunk(object):
Parameters Parameters
---------- ----------
cthunk cthunk
The CObject pointer used by run_cthunk. The CObject pointer used by run_cthunk.
init_tasks init_tasks
WRITEME WRITEME
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论