You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<span id="arrayfire-opencl-module"></span><h1>arrayfire.opencl module<a class="headerlink" href="#module-arrayfire.opencl" title="Permalink to this headline">¶</a></h1>
<p>Functions specific to OpenCL backend.</p>
<p>This module provides interoperability with other OpenCL libraries.</p>
<dd><p>Get the current OpenCL context being used by ArrayFire.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>retain</strong><span class="classifier">bool. optional. Default: False.</span></dt><dd><p>Specifies if the context needs to be retained by arrayfire before returning.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt><strong>context</strong><span class="classifier">integer denoting the context id.</span></dt><dd></dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.opencl.get_device_id">
<code class="sig-prename descclassname"><span class="pre">arrayfire.opencl.</span></code><code class="sig-name descname"><span class="pre">get_device_id</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/opencl.html#get_device_id"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.opencl.get_device_id" title="Permalink to this definition">¶</a></dt>
<dd><p>Get native (unsorted) OpenCL device ID</p>
<dl class="field-list simple">
<dt class="field-odd">Returns</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>idx</strong><span class="classifier">int.</span></dt><dd><p>Specifies the <cite>cl_device_id</cite> of the device.</p>
</dd>
</dl>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.opencl.get_device_type">
<code class="sig-prename descclassname"><span class="pre">arrayfire.opencl.</span></code><code class="sig-name descname"><span class="pre">get_device_type</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/opencl.html#get_device_type"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.opencl.get_device_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Get opencl device type</p>
</dd></dl>
<dl class="py function">
<dt id="arrayfire.opencl.get_platform">
<code class="sig-prename descclassname"><span class="pre">arrayfire.opencl.</span></code><code class="sig-name descname"><span class="pre">get_platform</span></code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/arrayfire/opencl.html#get_platform"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#arrayfire.opencl.get_platform" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the current OpenCL command queue being used by ArrayFire.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl class="simple">
<dt><strong>retain</strong><span class="classifier">bool. optional. Default: False.</span></dt><dd><p>Specifies if the context needs to be retained by arrayfire before returning.</p>
</dd>
</dl>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><dl class="simple">
<dt><strong>queue</strong><span class="classifier">integer denoting the queue id.</span></dt><dd></dd>