提交 766ecebc authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Some changes to the docs to follow the code.

上级 bebbb962
...@@ -113,14 +113,19 @@ instead. It adds a new section to the parsed files whose tag is ...@@ -113,14 +113,19 @@ instead. It adds a new section to the parsed files whose tag is
``kernels``. Inside that section you can define some kernels with ``kernels``. Inside that section you can define some kernels with
``#kernel name:params:flags``. ``#kernel name:params:flags``.
Here ``name`` is the name of the kernel function in the following code, Here ``name`` is the name of the kernel function in the following
``params`` is a comma-separeted list of C typecode names and ``flags`` is code, ``params`` is a comma-separeted list of numpy typecode names.
a ``|``-separeted list of C kernel flag values (can be empty). The same There are three exceptions for ``size_t`` which should be noted as
kernel definition as above would look like this with ``CGpuKernelBase``:: ``size``, ``ssize_t`` which should be noted as ``ssize`` and a pointer
which should be noted as ``*``.
``flags`` is a ``|``-separeted list of C kernel flag values (can be
empty). The same kernel definition as above would look like this with
``CGpuKernelBase``::
#section kernels #section kernels
#kernel k : GA_BUFFER, GA_SIZE, GA_SIZE : GA_USE_CLUDA|GA_USE_DOUBLE #kernel k : *, size, size : GA_USE_DOUBLE
KERNEL void k(GLOBAL_MEM ga_double *a, ga_size n, ga_size m) { KERNEL void k(GLOBAL_MEM ga_double *a, ga_size n, ga_size m) {
ga_size nb = n < m ? n : m; ga_size nb = n < m ? n : m;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论