Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 3abba1c7a0f7ec4c649289f5b8a17d86 > files > 122

python-opencl-2013.1-8.mga5.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Installation &mdash; PyOpenCL 2013.1 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="_static/akdoc.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '2013.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="PyOpenCL 2013.1 documentation" href="index.html" />
    <link rel="prev" title="Built-in Utilities" href="tools.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tools.html" title="Built-in Utilities"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">PyOpenCL 2013.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
<p>Installation information is maintained collaboratively on the
<a class="reference external" href="http://wiki.tiker.net/PyOpenCL/Installation">PyOpenCL Wiki</a>.</p>
</div>
<div class="section" id="acknowledgments">
<h1>Acknowledgments<a class="headerlink" href="#acknowledgments" title="Permalink to this headline">¶</a></h1>
<p>Too many to list. Please see the
<a class="reference external" href="https://github.com/inducer/pyopencl/commits/master">commit log</a>
for detailed acknowledgments.</p>
</div>
<div class="section" id="tips">
<h1>Tips<a class="headerlink" href="#tips" title="Permalink to this headline">¶</a></h1>
<div class="section" id="syntax-highlighting">
<h2>Syntax highlighting<a class="headerlink" href="#syntax-highlighting" title="Permalink to this headline">¶</a></h2>
<p>You can obtain Vim syntax highlighting for OpenCL C inlined in Python by
checking <a class="reference external" href="https://github.com/inducer/pyopencl/blob/master/contrib/pyopencl.vim">this file</a>.</p>
<p>Note that the triple-quoted strings containing the source must start with
<cite>&#8220;&#8221;&#8220;//CL// ...&#8221;&#8220;&#8221;</cite>.</p>
</div>
</div>
<div class="section" id="guidelines">
<h1>Guidelines<a class="headerlink" href="#guidelines" title="Permalink to this headline">¶</a></h1>
<div class="section" id="api-stability">
<span id="api-compatibility"></span><h2>API Stability<a class="headerlink" href="#api-stability" title="Permalink to this headline">¶</a></h2>
<p>I consider PyOpenCL&#8217;s API &#8220;stable&#8221;.  That doesn&#8217;t mean it can&#8217;t
change. But if it does, your code will generally continue to run. It
may however start spewing warnings about things you need to change to
stay compatible with future versions.</p>
<p>Deprecation warnings will be around for a whole year, as identified by the
first number in the release name.  (the &#8220;2014&#8221; in &#8220;2014.1&#8221;) I.e. a function
that was deprecated in 2014.n will generally be removed in 2015.n (or perhaps
later). Further, the stability promise applies for any code that&#8217;s part of a
released version. It doesn&#8217;t apply to undocumented bits of the API, and it
doesn&#8217;t apply to unreleased code downloaded from git.</p>
</div>
<div class="section" id="relation-with-opencl-s-c-bindings">
<span id="versus-c"></span><h2>Relation with OpenCL&#8217;s C Bindings<a class="headerlink" href="#relation-with-opencl-s-c-bindings" title="Permalink to this headline">¶</a></h2>
<p>We&#8217;ve tried to follow these guidelines when binding the OpenCL&#8217;s
C interface to Python:</p>
<ul class="simple">
<li>Remove the <cite>cl_</cite>, <cite>CL_</cite> and <cite>cl</cite> prefix from data types, macros and
function names.</li>
<li>Follow <span class="target" id="index-0"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-0008"><strong>PEP 8</strong></a>, i.e.<ul>
<li>Make function names lowercase.</li>
<li>If a data type or function name is composed of more than one word,
separate the words with a single underscore.</li>
</ul>
</li>
<li><cite>get_info</cite> functions become attributes.</li>
<li>Object creation is done by constructors, to the extent possible.
(i.e. minimize use of &#8220;factory functions&#8221;)</li>
<li>If an operation involves two or more &#8220;complex&#8221; objects (like e.g. a
kernel enqueue involves a kernel and a queue), refuse the temptation
to guess which one should get a method for the operation.
Instead, simply leave that command to be a function.</li>
</ul>
</div>
</div>
<div class="section" id="user-visible-changes">
<h1>User-visible Changes<a class="headerlink" href="#user-visible-changes" title="Permalink to this headline">¶</a></h1>
<div class="section" id="version-2013-1">
<h2>Version 2013.1<a class="headerlink" href="#version-2013-1" title="Permalink to this headline">¶</a></h2>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This version is currently under development. You can get snapshots from
PyOpenCL&#8217;s <a class="reference external" href="https://github.com/inducer/pyopencl">git repository</a></p>
</div>
<ul>
<li><p class="first">Vastly improved <a class="reference internal" href="algorithm.html#custom-scan"><em>Prefix Sums (&#8220;scan&#8221;)</em></a>.</p>
</li>
<li><p class="first">Add <tt class="xref py py-func docutils literal"><span class="pre">pyopencl.tools.match_dtype_to_c_struct()</span></tt>,
for better integration of the CL and <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.8)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a> type systems.</p>
</li>
<li><p class="first">More/improved Bessel functions.
See <a class="reference external" href="https://github.com/inducer/pyopencl/tree/master/src/cl">the source</a>.</p>
</li>
<li><p class="first">Add <span class="target" id="index-1"></span><tt class="xref std std-envvar docutils literal"><span class="pre">PYOPENCL_NO_CACHE</span></tt> environment variable to aid debugging
(e.g. with AMD&#8217;s CPU implementation, see
<a class="reference external" href="http://developer.amd.com/sdks/AMDAPPSDK/assets/AMD_Accelerated_Parallel_Processing_OpenCL_Programming_Guide.pdf">their programming guide</a>.</p>
</li>
<li><p class="first">Deprecated <a class="reference internal" href="array.html#pyopencl.tools.register_dtype" title="pyopencl.tools.register_dtype"><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.tools.register_dtype()</span></tt></a> in favor of
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.tools.get_or_register_dtype()</span></tt>.</p>
</li>
<li><p class="first">Clean up the <tt class="xref py py-class docutils literal"><span class="pre">pyopencl.array.Array</span></tt> constructor interface. Deprecate
arrays with <tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.array.Array.queue</span></tt> equal to <em>None</em>.</p>
</li>
<li><p class="first">Deprecate <tt class="xref py py-class docutils literal"><span class="pre">pyopencl.array.DefaultAllocator</span></tt>.</p>
</li>
<li><p class="first">Deprecate <tt class="xref py py-class docutils literal"><span class="pre">pyopencl.tools.CLAllocator</span></tt>.</p>
</li>
<li><p class="first">Introudce <a class="reference internal" href="tools.html#pyopencl.tools.DeferredAllocator" title="pyopencl.tools.DeferredAllocator"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.tools.DeferredAllocator</span></tt></a>, <a class="reference internal" href="tools.html#pyopencl.tools.ImmediateAllocator" title="pyopencl.tools.ImmediateAllocator"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.tools.ImmediateAllocator</span></tt></a>.</p>
</li>
<li><p class="first">Allow arrays whose beginning does not coincide with the beginning of their
<tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.array.Array.data</span></tt> <a class="reference internal" href="runtime.html#pyopencl.Buffer" title="pyopencl.Buffer"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Buffer</span></tt></a>.
See <tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.array.Array.base_data</span></tt> and <tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.array.Array.offset</span></tt>.
Note that not all functions in PyOpenCL support such arrays just yet. These
will fail with <tt class="xref py py-exc docutils literal"><span class="pre">pyopencl.array.ArrayHasOffsetError</span></tt>.</p>
</li>
<li><p class="first">Add <tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.array.Array.__getitem__()</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.array.Array.__setitem__()</span></tt>,
supporting generic slicing.</p>
<p>It is <em>possible</em> to create non-contiguous arrays using this functionality.
Most operations (elementwise etc.) will not work on such arrays.</p>
<p>Note also that some operations (specifically, reductions and scans) on sliced
arrays that start past the beginning of the original array will fail for now.
This will be fixed in a future release.</p>
</li>
<li><p class="first"><a class="reference internal" href="runtime.html#pyopencl.CommandQueue" title="pyopencl.CommandQueue"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.CommandQueue</span></tt></a> may be used as a context manager (in a <tt class="docutils literal"><span class="pre">with</span></tt> statement)</p>
</li>
<li><p class="first">Add <tt class="xref py py-func docutils literal"><span class="pre">pyopencl.clmath.atan2()</span></tt>, <tt class="xref py py-func docutils literal"><span class="pre">pyopencl.clmath.atan2pi()</span></tt>.</p>
</li>
<li><p class="first">Add <tt class="xref py py-func docutils literal"><span class="pre">pyopencl.array.concatenate()</span></tt>.</p>
</li>
<li><p class="first">Add <a class="reference internal" href="runtime.html#pyopencl.Kernel.capture_call" title="pyopencl.Kernel.capture_call"><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.Kernel.capture_call()</span></tt></a>.</p>
</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>The addition of <tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.array.Array.__getitem__()</span></tt> has an unintended
consequence due to <a class="reference external" href="https://github.com/numpy/numpy/issues/3375">numpy bug 3375</a>.  For instance, this
expression:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">numpy</span><span class="o">.</span><span class="n">float32</span><span class="p">(</span><span class="mi">5</span><span class="p">)</span> <span class="o">*</span> <span class="n">some_pyopencl_array</span>
</pre></div>
</div>
<p>may take a very long time to execute. This is because <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.8)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a> first
builds an object array of (compute-device) scalars (!) before it decided that
that&#8217;s probably not such a bright idea and finally calls
<tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.array.Array.__rmul__()</span></tt>.</p>
<p>Note that only left arithmetic operations of <tt class="xref py py-class docutils literal"><span class="pre">pyopencl.array.Array</span></tt>
by <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.8)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a> scalars are affected. Python&#8217;s number types (<a class="reference external" href="http://docs.python.org/dev/library/functions.html#float" title="(in Python v3.5)"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a> etc.)
are unaffected, as are right multiplications.</p>
<p>If a program that used to run fast suddenly runs extremely slowly, it is
likely that this bug is to blame.</p>
<p>Here&#8217;s what you can do:</p>
<ul class="last simple">
<li>Use Python scalars instead of <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.8)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a> scalars.</li>
<li>Switch to right multiplications if possible.</li>
<li>Use a patched <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.8)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a>. See the bug report linked above for a pull
request with a fix.</li>
<li>Switch to a fixed version of <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.8)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a> when available.</li>
</ul>
</div>
</div>
<div class="section" id="version-2012-1">
<h2>Version 2012.1<a class="headerlink" href="#version-2012-1" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Support for complex numbers.</li>
<li>Support for Bessel functions. (experimental)</li>
<li>Numerous fixes.</li>
</ul>
</div>
<div class="section" id="version-2011-2">
<h2>Version 2011.2<a class="headerlink" href="#version-2011-2" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Add <tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_migrate_mem_object()</span></tt>.</li>
<li>Add <a class="reference internal" href="runtime.html#pyopencl.image_from_array" title="pyopencl.image_from_array"><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.image_from_array()</span></tt></a>.</li>
<li>IMPORTANT BUGFIX: Kernel caching was broken for all the 2011.1.x releases, with
severe consequences on the execution time of <tt class="xref py py-class docutils literal"><span class="pre">pyopencl.array.Array</span></tt>
operations.
Henrik Andresen at a <a class="reference external" href="http://gpulab.imm.dtu.dk/courses.html">PyOpenCL workshop at DTU</a>
first noticed the strange timings.</li>
<li>All comparable PyOpenCL objects are now also hashable.</li>
<li>Add <tt class="xref py py-func docutils literal"><span class="pre">pyopencl.tools.context_dependent_memoize()</span></tt> to the documented
functionality.</li>
<li>Base <tt class="xref py py-mod docutils literal"><span class="pre">pyopencl.clrandom</span></tt> on <a class="reference external" href="https://bitbucket.org/ivarun/ranluxcl">RANLUXCL</a>,
add functionality.</li>
<li>Add <a class="reference internal" href="runtime.html#pyopencl.NannyEvent" title="pyopencl.NannyEvent"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.NannyEvent</span></tt></a> objects.</li>
<li>Add <tt class="xref py py-mod docutils literal"><span class="pre">pyopencl.characterize</span></tt>.</li>
<li>Ensure compatibility with OS X Lion.</li>
<li>Add <a class="reference internal" href="array.html#pyopencl.tools.register_dtype" title="pyopencl.tools.register_dtype"><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.tools.register_dtype()</span></tt></a> to enable scan/reduction on struct types.</li>
<li><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_migrate_mem_object()</span></tt> was renamed
<a class="reference internal" href="runtime.html#pyopencl.enqueue_migrate_mem_object_ext" title="pyopencl.enqueue_migrate_mem_object_ext"><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_migrate_mem_object_ext()</span></tt></a>.
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_migrate_mem_object()</span></tt> now refers to the OpenCL 1.2 function
of this name, if available.</li>
<li><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_sub_devices()</span></tt> was renamed
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_sub_devices_ext()</span></tt>.
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_sub_devices()</span></tt> now refers to the OpenCL 1.2 function
of this name, if available.</li>
<li>Alpha support for OpenCL 1.2.</li>
</ul>
</div>
<div class="section" id="version-2011-1-2">
<h2>Version 2011.1.2<a class="headerlink" href="#version-2011-1-2" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>More bug fixes.</li>
</ul>
</div>
<div class="section" id="version-2011-1-1">
<h2>Version 2011.1.1<a class="headerlink" href="#version-2011-1-1" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fixes for Python 3 compatibility. (with work by Christoph Gohlke)</li>
</ul>
</div>
<div class="section" id="version-2011-1">
<h2>Version 2011.1<a class="headerlink" href="#version-2011-1" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>All <em>is_blocking</em> parameters now default to <em>True</em> to avoid
crashy-by-default behavior. (suggested by Jan Meinke)
In particular, this change affects
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_read_buffer()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_write_buffer()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_read_buffer_rect()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_write_buffer_rect()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_read_image()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_write_image()</span></tt>,
<a class="reference internal" href="runtime.html#pyopencl.enqueue_map_buffer" title="pyopencl.enqueue_map_buffer"><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_map_buffer()</span></tt></a>,
<a class="reference internal" href="runtime.html#pyopencl.enqueue_map_image" title="pyopencl.enqueue_map_image"><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_map_image()</span></tt></a>.</li>
<li>Add <a class="reference internal" href="algorithm.html#module-pyopencl.reduction" title="pyopencl.reduction"><tt class="xref py py-mod docutils literal"><span class="pre">pyopencl.reduction</span></tt></a>.</li>
<li>Add <a class="reference internal" href="array.html#reductions"><em>Reductions</em></a>.</li>
<li>Add <a class="reference internal" href="algorithm.html#module-pyopencl.scan" title="pyopencl.scan"><tt class="xref py py-mod docutils literal"><span class="pre">pyopencl.scan</span></tt></a>.</li>
<li>Add <a class="reference internal" href="runtime.html#pyopencl.MemoryObject.get_host_array" title="pyopencl.MemoryObject.get_host_array"><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.MemoryObject.get_host_array()</span></tt></a>.</li>
<li>Deprecate context arguments of
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.array.to_device()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.array.zeros()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.array.arange()</span></tt>.</li>
<li>Make construction of <tt class="xref py py-class docutils literal"><span class="pre">pyopencl.array.Array</span></tt> more flexible (<em>cqa</em> argument.)</li>
<li>Add <a class="reference internal" href="tools.html#memory-pools"><em>Memory Pools</em></a>.</li>
<li>Add vector types, see <a class="reference internal" href="array.html#pyopencl.array.vec" title="pyopencl.array.vec"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.array.vec</span></tt></a>.</li>
<li>Add <tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.array.Array.strides</span></tt>, <tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.array.Array.flags</span></tt>.
Allow the creation of arrys in C and Fortran order.</li>
<li>Add <tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_copy()</span></tt>. Deprecate all other transfer functions.</li>
<li>Add support for numerous extensions, among them device fission.</li>
<li>Add a compiler cache.</li>
<li>Add the &#8216;g_times_l&#8217; keyword arg to kernel execution.</li>
</ul>
</div>
<div class="section" id="version-0-92">
<h2>Version 0.92<a class="headerlink" href="#version-0-92" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Add support for OpenCL 1.1.</li>
<li>Add support for the
<a class="reference external" href="ghttp://www.khronos.org/registry/cl/extensions/khr/cl_khr_gl_sharing.txt">cl_khr_gl_sharing</a>
extension, leading to working GL interoperability.</li>
<li>Add <a class="reference internal" href="runtime.html#pyopencl.Kernel.set_args" title="pyopencl.Kernel.set_args"><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.Kernel.set_args()</span></tt></a>.</li>
<li>The call signature of <a class="reference internal" href="runtime.html#pyopencl.Kernel.__call__" title="pyopencl.Kernel.__call__"><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.Kernel.__call__()</span></tt></a> changed to
emphasize the importance of <em>local_size</em>.</li>
<li>Add <a class="reference internal" href="runtime.html#pyopencl.Kernel.set_scalar_arg_dtypes" title="pyopencl.Kernel.set_scalar_arg_dtypes"><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.Kernel.set_scalar_arg_dtypes()</span></tt></a>.</li>
<li>Add support for the
<a class="reference external" href="http://www.khronos.org/registry/cl/extensions/khr/cl_nv_device_attribute_query.txt">cl_nv_device_attribute_query</a>
extension.</li>
<li>Add <tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.array.Array()</span></tt> and related functionality.</li>
<li>Make build not depend on Boost C++.</li>
</ul>
</div>
<div class="section" id="version-0-91-5">
<h2>Version 0.91.5<a class="headerlink" href="#version-0-91-5" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Add <a class="reference internal" href="runtime.html#pyopencl.ImageFormat.channel_count" title="pyopencl.ImageFormat.channel_count"><tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.ImageFormat.channel_count</span></tt></a>,
<a class="reference internal" href="runtime.html#pyopencl.ImageFormat.dtype_size" title="pyopencl.ImageFormat.dtype_size"><tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.ImageFormat.dtype_size</span></tt></a>,
<a class="reference internal" href="runtime.html#pyopencl.ImageFormat.itemsize" title="pyopencl.ImageFormat.itemsize"><tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.ImageFormat.itemsize</span></tt></a>.</li>
<li>Add missing <tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_copy_buffer()</span></tt>.</li>
<li>Add <a class="reference internal" href="runtime.html#pyopencl.create_some_context" title="pyopencl.create_some_context"><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_some_context()</span></tt></a>.</li>
<li>Add <a class="reference internal" href="runtime.html#pyopencl.enqueue_barrier" title="pyopencl.enqueue_barrier"><tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_barrier()</span></tt></a>, which was previously missing.</li>
</ul>
</div>
<div class="section" id="version-0-91-4">
<h2>Version 0.91.4<a class="headerlink" href="#version-0-91-4" title="Permalink to this headline">¶</a></h2>
<p>A bugfix release. No user-visible changes.</p>
</div>
<div class="section" id="version-0-91-3">
<h2>Version 0.91.3<a class="headerlink" href="#version-0-91-3" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>All parameters named <em>host_buffer</em> were renamed <em>hostbuf</em> for consistency
with the <a class="reference internal" href="runtime.html#pyopencl.Buffer" title="pyopencl.Buffer"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Buffer</span></tt></a> constructor introduced in 0.91.
Compatibility code is in place.</li>
<li>The <tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Image</span></tt> constructor does not need a <em>shape</em> parameter if the
given <em>hostbuf</em> has <em>hostbuf.shape</em>.</li>
<li>The <a class="reference internal" href="runtime.html#pyopencl.Context" title="pyopencl.Context"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Context</span></tt></a> constructor can now be called without parameters.</li>
</ul>
</div>
<div class="section" id="version-0-91-2">
<h2>Version 0.91.2<a class="headerlink" href="#version-0-91-2" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><a class="reference internal" href="runtime.html#pyopencl.Program.build" title="pyopencl.Program.build"><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.Program.build()</span></tt></a> now captures build logs and adds them
to the exception text.</li>
<li>Deprecate <tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_context_from_type()</span></tt> in favor of second
form of <a class="reference internal" href="runtime.html#pyopencl.Context" title="pyopencl.Context"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Context</span></tt></a> constructor</li>
<li>Introduce <a class="reference internal" href="runtime.html#pyopencl.LocalMemory" title="pyopencl.LocalMemory"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.LocalMemory</span></tt></a>.</li>
<li>Document kernel invocation and <a class="reference internal" href="runtime.html#pyopencl.Kernel.set_arg" title="pyopencl.Kernel.set_arg"><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.Kernel.set_arg()</span></tt></a>.</li>
</ul>
</div>
<div class="section" id="version-0-91-1">
<h2>Version 0.91.1<a class="headerlink" href="#version-0-91-1" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fixed a number of bugs, notably involving <a class="reference internal" href="runtime.html#pyopencl.Sampler" title="pyopencl.Sampler"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Sampler</span></tt></a>.</li>
<li><a class="reference internal" href="runtime.html#pyopencl.Device" title="pyopencl.Device"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Device</span></tt></a>, <a class="reference internal" href="runtime.html#pyopencl.Platform" title="pyopencl.Platform"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Platform</span></tt></a>,
<a class="reference internal" href="runtime.html#pyopencl.Context" title="pyopencl.Context"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Context</span></tt></a> now have nicer string representations.</li>
<li>Add <tt class="xref py py-attr docutils literal"><span class="pre">Image.shape</span></tt>. (suggested by David Garcia)</li>
</ul>
</div>
<div class="section" id="version-0-91">
<h2>Version 0.91<a class="headerlink" href="#version-0-91" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Add <a class="reference internal" href="runtime.html#gl-interop"><em>GL Interoperability</em></a>.</li>
<li>Add a test suite.</li>
<li>Fix numerous <cite>get_info</cite> bugs. (reports by David Garcia and the test suite)</li>
<li>Add <a class="reference internal" href="runtime.html#pyopencl.ImageFormat.__repr__" title="pyopencl.ImageFormat.__repr__"><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.ImageFormat.__repr__()</span></tt></a>.</li>
<li>Add <tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.addressing_mode.to_string()</span></tt> and colleagues.</li>
<li>The <cite>pitch</cite> arguments to
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_image_2d()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_image_3d()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_read_image()</span></tt>, and
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.enqueue_write_image()</span></tt>
are now defaulted to zero. The argument order of <cite>enqueue_{read,write}_image</cite>
has changed for this reason.</li>
<li>Deprecate
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_image_2d()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_image_3d()</span></tt>
in favor of the <tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Image</span></tt> constructor.</li>
<li>Deprecate
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_program_with_source()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_program_with_binary()</span></tt>
in favor of the <a class="reference internal" href="runtime.html#pyopencl.Program" title="pyopencl.Program"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Program</span></tt></a> constructor.</li>
<li>Deprecate
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_buffer()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">pyopencl.create_host_buffer()</span></tt>
in favor of the <a class="reference internal" href="runtime.html#pyopencl.Buffer" title="pyopencl.Buffer"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.Buffer</span></tt></a> constructor.</li>
<li><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.MemoryObject.get_image_info()</span></tt> now actually exists.</li>
<li>Add <tt class="xref py py-attr docutils literal"><span class="pre">pyopencl.MemoryObject.image.info</span></tt>.</li>
<li>Fix API tracing.</li>
<li>Add constructor arguments to <a class="reference internal" href="runtime.html#pyopencl.ImageFormat" title="pyopencl.ImageFormat"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.ImageFormat</span></tt></a>.  (suggested by David Garcia)</li>
</ul>
</div>
<div class="section" id="version-0-90-4">
<h2>Version 0.90.4<a class="headerlink" href="#version-0-90-4" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Add build fixes for Windows and OS X.</li>
</ul>
</div>
<div class="section" id="version-0-90-3">
<h2>Version 0.90.3<a class="headerlink" href="#version-0-90-3" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fix a GNU-ism in the C++ code of the wrapper.</li>
</ul>
</div>
<div class="section" id="version-0-90-2">
<h2>Version 0.90.2<a class="headerlink" href="#version-0-90-2" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fix <a class="reference internal" href="runtime.html#pyopencl.Platform.get_info" title="pyopencl.Platform.get_info"><tt class="xref py py-meth docutils literal"><span class="pre">pyopencl.Platform.get_info()</span></tt></a>.</li>
<li>Fix passing properties to <a class="reference internal" href="runtime.html#pyopencl.CommandQueue" title="pyopencl.CommandQueue"><tt class="xref py py-class docutils literal"><span class="pre">pyopencl.CommandQueue</span></tt></a>.
Also fix related documentation.</li>
</ul>
</div>
<div class="section" id="version-0-90-1">
<h2>Version 0.90.1<a class="headerlink" href="#version-0-90-1" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fix building on the Mac.</li>
</ul>
</div>
<div class="section" id="version-0-90">
<h2>Version 0.90<a class="headerlink" href="#version-0-90" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Initial release.</li>
</ul>
</div>
</div>
<div class="section" id="license">
<span id="id1"></span><h1>License<a class="headerlink" href="#license" title="Permalink to this headline">¶</a></h1>
<p>PyOpenCL is licensed to you under the MIT/X Consortium license:</p>
<p>Copyright (c) 2009-13 Andreas Klöckner and Contributors.</p>
<p>Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the &#8220;Software&#8221;), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:</p>
<p>The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED &#8220;AS IS&#8221;, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.</p>
<p>PyOpenCL includes derivatives of parts of the <a class="reference external" href="https://code.google.com/p/thrust/">Thrust</a> computing package (in particular the scan
implementation). These parts are licensed as follows:</p>
<blockquote>
<div><p>Copyright 2008-2011 NVIDIA Corporation</p>
<p>Licensed under the Apache License, Version 2.0 (the &#8220;License&#8221;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at</p>
<blockquote>
<div>&lt;<a class="reference external" href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>&gt;</div></blockquote>
<p>Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &#8220;AS IS&#8221; BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</p>
</div></blockquote>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you use Apache-licensed parts, be aware that these may be incompatible
with software licensed exclusively under GPL2.  (Most software is licensed
as GPL2 or later, in which case this is not an issue.)</p>
</div>
<p>PyOpenCL includes the RANLUXCL random number generator:</p>
<blockquote>
<div><p>Copyright (c) 2011 Ivar Ursin Nikolaisen</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the &#8220;Software&#8221;), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:</p>
<p>The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED &#8220;AS IS&#8221;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
</div></blockquote>
</div>
<div class="section" id="frequently-asked-questions">
<h1>Frequently Asked Questions<a class="headerlink" href="#frequently-asked-questions" title="Permalink to this headline">¶</a></h1>
<p>The FAQ is maintained collaboratively on the
<a class="reference external" href="http://wiki.tiker.net/PyOpenCL/FrequentlyAskedQuestions">Wiki FAQ page</a>.</p>
</div>
<div class="section" id="citing-pyopencl">
<h1>Citing PyOpenCL<a class="headerlink" href="#citing-pyopencl" title="Permalink to this headline">¶</a></h1>
<p>We are not asking you to gratuitously cite PyOpenCL in work that is otherwise
unrelated to software. That said, if you do discuss some of the development
aspects of your code and would like to highlight a few of the ideas behind
PyOpenCL, feel free to cite this article:</p>
<blockquote>
<div>Andreas Klöckner, Nicolas Pinto, Yunsup Lee, Bryan Catanzaro, Paul Ivanov,
Ahmed Fasih, PyCUDA and PyOpenCL: A scripting-based approach to GPU
run-time code generation, Parallel Computing, Volume 38, Issue 3, March
2012, Pages 157-174.</div></blockquote>
<p>Here&#8217;s a Bibtex entry for your convenience:</p>
<div class="highlight-python"><div class="highlight"><pre>@article{kloeckner_pycuda_2012,
   author = {{Kl{\&quot;o}ckner}, Andreas
        and {Pinto}, Nicolas
        and {Lee}, Yunsup
        and {Catanzaro}, B.
        and {Ivanov}, Paul
        and {Fasih}, Ahmed },
   title = &quot;{PyCUDA and PyOpenCL: A Scripting-Based Approach to GPU Run-Time Code Generation}&quot;,
   journal = &quot;Parallel Computing&quot;,
   volume = &quot;38&quot;,
   number = &quot;3&quot;,
   pages = &quot;157--174&quot;,
   year = &quot;2012&quot;,
   issn = &quot;0167-8191&quot;,
   doi = &quot;10.1016/j.parco.2011.09.001&quot;,
}
</pre></div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Installation</a></li>
<li><a class="reference internal" href="#acknowledgments">Acknowledgments</a></li>
<li><a class="reference internal" href="#tips">Tips</a><ul>
<li><a class="reference internal" href="#syntax-highlighting">Syntax highlighting</a></li>
</ul>
</li>
<li><a class="reference internal" href="#guidelines">Guidelines</a><ul>
<li><a class="reference internal" href="#api-stability">API Stability</a></li>
<li><a class="reference internal" href="#relation-with-opencl-s-c-bindings">Relation with OpenCL&#8217;s C Bindings</a></li>
</ul>
</li>
<li><a class="reference internal" href="#user-visible-changes">User-visible Changes</a><ul>
<li><a class="reference internal" href="#version-2013-1">Version 2013.1</a></li>
<li><a class="reference internal" href="#version-2012-1">Version 2012.1</a></li>
<li><a class="reference internal" href="#version-2011-2">Version 2011.2</a></li>
<li><a class="reference internal" href="#version-2011-1-2">Version 2011.1.2</a></li>
<li><a class="reference internal" href="#version-2011-1-1">Version 2011.1.1</a></li>
<li><a class="reference internal" href="#version-2011-1">Version 2011.1</a></li>
<li><a class="reference internal" href="#version-0-92">Version 0.92</a></li>
<li><a class="reference internal" href="#version-0-91-5">Version 0.91.5</a></li>
<li><a class="reference internal" href="#version-0-91-4">Version 0.91.4</a></li>
<li><a class="reference internal" href="#version-0-91-3">Version 0.91.3</a></li>
<li><a class="reference internal" href="#version-0-91-2">Version 0.91.2</a></li>
<li><a class="reference internal" href="#version-0-91-1">Version 0.91.1</a></li>
<li><a class="reference internal" href="#version-0-91">Version 0.91</a></li>
<li><a class="reference internal" href="#version-0-90-4">Version 0.90.4</a></li>
<li><a class="reference internal" href="#version-0-90-3">Version 0.90.3</a></li>
<li><a class="reference internal" href="#version-0-90-2">Version 0.90.2</a></li>
<li><a class="reference internal" href="#version-0-90-1">Version 0.90.1</a></li>
<li><a class="reference internal" href="#version-0-90">Version 0.90</a></li>
</ul>
</li>
<li><a class="reference internal" href="#license">License</a></li>
<li><a class="reference internal" href="#frequently-asked-questions">Frequently Asked Questions</a></li>
<li><a class="reference internal" href="#citing-pyopencl">Citing PyOpenCL</a></li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="tools.html"
                        title="previous chapter">Built-in Utilities</a></p>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="tools.html" title="Built-in Utilities"
             >previous</a> |</li>
        <li><a href="index.html">PyOpenCL 2013.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2009, Andreas Kloeckner.
      Last updated on Oct 15, 2014.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>