提交 30856f64 authored 作者: Frederic Bastien's avatar Frederic Bastien

fixed doc rst syntax problem

上级 25aca3fa
......@@ -295,6 +295,7 @@ Windows V1(bigger install, but simpler instruction + try instruction for gpu)
.theanorc.txt is also accepted on Windows if the environment
variable THEANORC is not set. The file should have the following
two lines:
.. code-block:: bash
[blas]
......@@ -305,6 +306,7 @@ Windows V1(bigger install, but simpler instruction + try instruction for gpu)
To test that theano read correctly the .theanorc or .theanorc.txt file,
in python run:
.. code-block:: bash
import theano
print theano.config.blas.ldflags
......@@ -359,11 +361,13 @@ Windows V1(bigger install, but simpler instruction + try instruction for gpu)
them, so your configuration file path can contain them.
nvcc(at least version 3.1) don't support them well. If your USERPROFILE
directory contain those caractere, you must add in your configuration file:
.. code-block:: bash
[global]
base_compiledir=PATH_TO_A_DIRECTORY_WITHOUT_THOSE_CARACTERE
You also need to add in the configuration file those line:
.. code-block:: bash
[cuda]
nvccflags=-LC:\Python26\libs
......
......@@ -68,7 +68,7 @@ Failure
Besides cleanup code, all code has access to the %(fail)s template. For three code blocks, the generated C code will pretty much look like this:
.. code-block::
.. code-block:: CPP
int failure = 0;
{
<code1>
......@@ -91,7 +91,7 @@ And %(fail)s in the nth code block will take the value "{failure = n; goto label
When compiling an Op, we want to sync the outputs so we can get the results from Python. In case of failure, we will not necessarily want to sync. Because of that, typical code will look like this:
.. code-block::
.. code-block:: CPP
int failure = 0;
<declare input>
<declare output>
......@@ -122,7 +122,7 @@ Example ResultBase
The following ResultBase represents a double (we only care about the C part).
.. code-block::
.. code-block:: CPP
class Double(ResultBase):
<snip>
......@@ -143,7 +143,7 @@ Example Op
The following ResultBase represents addition of two nonnegative doubles (we only care about the C part).
.. code-block::
.. code-block:: python
class Add(Op):
<snip>
def c_var_names(self):
......@@ -162,7 +162,7 @@ Generating a C function
For the example Op, the generated C function will typically look like this:
.. code-block::
.. code-block:: python
void add(PyObject* storage_x, PyObject* storage_y, PyObject* storage_z) {
PyObject* py_x = PyList_GET_ITEM(storage_x, 0); Py_XINCREF(py_x); // automatic
PyObject* py_y = PyList_GET_ITEM(storage_y, 0); Py_XINCREF(py_y); // automatic
......@@ -214,7 +214,7 @@ To accelerate processing a tad, a struct can be generated instead of a function.
Here is a sketch of the struct equivalent of the previous function:
.. code-block::
.. code-block:: CPP
struct add {
PyObject* storage_x;
PyObject* storage_y;
......
......@@ -33,7 +33,7 @@ Question: does it make sense to apply the order to the loop, or is this broadcas
Here is the loop for {{{order == c}}}. Check for errors!
.. code-block::
.. code-block:: CPP
<initialize iterators>
i1 = -1
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论