提交 99fcfdcb authored 作者: Chinnadhurai Sankar's avatar Chinnadhurai Sankar

fix based on comments

上级 e532461d
...@@ -30,12 +30,12 @@ class CallCache(object): ...@@ -30,12 +30,12 @@ class CallCache(object):
Retrieve item from the cache(if available) Retrieve item from the cache(if available)
based on a key based on a key
Parameters Parameters:
------------ ----------
key key
parameter to retrieve cache item parameter to retrieve cache item
fn,args fn,args
key to retrieve if "key" is None key to retrieve if "key" is None
""" """
if key is None: if key is None:
key = (fn, tuple(args)) key = (fn, tuple(args))
......
...@@ -154,7 +154,7 @@ def code_gen(blocks): ...@@ -154,7 +154,7 @@ def code_gen(blocks):
} }
Parameters: Parameters:
---------------- ----------
blocks blocks
List of CodeBlock instances such that List of CodeBlock instances such that
* declarations, behavior and cleanup are in the run() * declarations, behavior and cleanup are in the run()
...@@ -1170,7 +1170,10 @@ class CLinker(link.Linker): ...@@ -1170,7 +1170,10 @@ class CLinker(link.Linker):
be allocated. be allocated.
storage_map: dict that map variables to storages. storage_map: dict that map variables to storages.
This is used when you need to customize the storage of This is used when you need to customize the storage of
this thunk.keep_lock this thunk
keep_lock:
If True, we won't release the lock on the compiledir
at the end of this function call.
Returns: thunk, input_storage, output_storage Returns: thunk, input_storage, output_storage
The return values can be used as follows: The return values can be used as follows:
...@@ -1559,7 +1562,7 @@ class CLinker(link.Linker): ...@@ -1559,7 +1562,7 @@ class CLinker(link.Linker):
can carry on the computation of this linker's fgraph can carry on the computation of this linker's fgraph
Parameters: Parameters:
--------------- ----------
error_storage -> list of length 3 error_storage -> list of length 3
in_storage -> list of lists of length 1, one per input in_storage -> list of lists of length 1, one per input
out_storage -> list of lists of length 1, one per output out_storage -> list of lists of length 1, one per output
...@@ -1840,10 +1843,12 @@ def _default_checker(x, y): ...@@ -1840,10 +1843,12 @@ def _default_checker(x, y):
""" """
Default checker for DualLinker. This checks that the Default checker for DualLinker. This checks that the
variables contain the same data using ==. variables contain the same data using ==.
Parameters
-------------
Parameters:
----------
x,y x,y
the variables to compare data the variables to compare data
""" """
if x[0] != y[0]: if x[0] != y[0]:
raise Exception("Output mismatch.", raise Exception("Output mismatch.",
......
...@@ -1481,7 +1481,8 @@ def _rmtree(parent, ignore_nocleanup=False, msg='', level=logging.DEBUG, ...@@ -1481,7 +1481,8 @@ def _rmtree(parent, ignore_nocleanup=False, msg='', level=logging.DEBUG,
So instead, some commands in this file will respond to a So instead, some commands in this file will respond to a
failed rmtree() by touching a 'delete.me' file. This file is a message failed rmtree() by touching a 'delete.me' file. This file is a message
for a future process to try deleting the directory. for a future process to try deleting the directory.
Paramters
Parameters:
---------- ----------
parent parent
Root node to start deleting from Root node to start deleting from
......
...@@ -60,14 +60,15 @@ def thunk_hook(type, value, trace): ...@@ -60,14 +60,15 @@ def thunk_hook(type, value, trace):
and prints it out on L{stderr}. and prints it out on L{stderr}.
The normal excepthook is then called. The normal excepthook is then called.
Parameters
------------ Parameters:
----------
type type
Exception class Exception class
value value
Exception instance Exception instance
trace trace
Traceback object Traceback object
Notes Notes
----- -----
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论