blob: 064338ebbd8f6ca27e4b13b2c0a2208442a7d48a [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
"" [
<!ENTITY cl_queue_properties_Inc SYSTEM "cl_queue_properties_Inc.xml">
<!ENTITY out_of_order_exec_Inc SYSTEM "out_of_order_exec_Inc.xml">
<holder>The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and/or associated documentation files (the
"Materials"), to deal in the Materials without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Materials, and to
permit persons to whom the Materials are furnished to do so, subject to
the condition that this copyright notice and permission notice shall be included
in all copies or substantial portions of the Materials.</holder>
<!-- ================================ SYNOPSIS -->
<refnamediv id="clCreateCommandQueueWithProperties">
<refpurpose>Create a host or device command-queue on a specific device.</refpurpose>
<refsynopsisdiv xmlns:xlink=""><title></title>
<funcdef><link xlink:href="abstractDataTypes.html">cl_command_queue</link> <function>clCreateCommandQueueWithProperties</function></funcdef>
<paramdef><link xlink:href="abstractDataTypes.html">cl_context</link><parameter>context</parameter></paramdef>
<paramdef><link xlink:href="abstractDataTypes.html">cl_device_id</link><parameter>device</parameter></paramdef>
<paramdef>const <link xlink:href="enums.html#cl_queue_properties">cl_queue_properties</link><parameter>*properties</parameter></paramdef>
<paramdef><link xlink:href="scalarDataTypes.html">cl_int</link><parameter>*errcode_ret</parameter></paramdef>
<!-- ================================ PARAMETERS -->
<!-- For each <varlistentry />, place the parameter name in <term /><varname />, then the definition in
<listitem /><para />. When refering to anything that has a page in this system, use
<citerefentry /><refentrytitle /> to make it a link.
<refsect1 id="parameters"><title>Parameters</title>
Must be a valid OpenCL context.
Must be a device or sub-device associated with <varname>context</varname>.
It can either be in the list of devices and sub-devices specified when
<varname>context</varname> is created using
or be a root device with the same device type as specified
when the <varname>context</varname> is created using
<!-- ================================ PARAMETER TABLE (OPTIONAL) -->
Specifies a list of properties for the
command-queue and their corresponding values.
Each property name is immediately followed
by the corresponding desired value. The list is
terminated with 0. The list of supported properties
is described in the table below. If a
supported property and its value is not specified in
<varname>properties</varname>, its default value will be used.
<varname>properties</varname> can be NULL in which case
the default values for supported command-queue properties
will be used.
<!-- ================================ END PARAMETER TABLE -->
Returns an appropriate error code. If <varname>errcode_ret</varname>
is <constant>NULL</constant>, no error code is returned.
<!-- ================================ NOTES -->
<refsect1 id="notes"><title>Notes</title>
OpenCL objects such as memory, program and kernel objects are created using a
context. Operations on these objects are performed using a command-queue. The
command-queue can be used to queue a set of operations (referred to as commands)
in order. Having multiple command-queues allows applications to queue multiple
independent commands without requiring synchronization. Note that this should work
as long as these objects are not being shared. Sharing of objects across multiple
command-queues will require the application to perform appropriate synchronization.
This is described in Appendix A of the specification.
<!-- ================================ ERRORS -->
<refsect1 id="errors"><title>Errors</title>
returns a valid non-zero command-queue and
<varname>errcode_ret</varname> is set to <errorname>CL_SUCCESS</errorname> if the
command-queue is created successfully. Otherwise, it returns a NULL value with one
of the following error values returned in <varname>errcode_ret</varname>:
<itemizedlist mark="disc">
<errorname>CL_INVALID_CONTEXT</errorname> if <varname>context</varname> is not a valid
<errorname>CL_INVALID_DEVICE</errorname> if <varname>device</varname> is not a valid
device or is not associated with <varname>context</varname>.
<errorname>CL_INVALID_VALUE</errorname> if values specified in
<varname>properties</varname> are not valid.
<errorname>CL_INVALID_QUEUE_PROPERTIES</errorname> if values specified in
<varname>properties</varname> are valid but are not supported by the device.
<errorname>CL_OUT_OF_RESOURCES</errorname> if there is a failure
to allocate resources required by the OpenCL implementation on the device.
<errorname>CL_OUT_OF_HOST_MEMORY</errorname> if there is a failure
to allocate resources required by the OpenCL implementation on the host.
<errorname>CL_INVALID_QUEUE_PROPERTIES</errorname> if
is enabled and
the <constant>CL_QUEUE_PRIORITY_KHR</constant> property is
specified and the queue is a <constant>CL_QUEUE_ON_DEVICE</constant>.
<errorname>CL_INVALID_QUEUE_PROPERTIES</errorname> if
is enabled and
the <constant>CL_QUEUE_PRIORITY_KHR</constant> property is
specified and the queue is a <constant>CL_QUEUE_ON_DEVICE</constant>.
<!-- ================================ EXAMPLE --> <!-- DO NOT DELETE IN CASE AN EXAMPLE IS
<refsect2 id="example1">
<informaltable frame="none">
<tgroup cols="1" align="left" colsep="0" rowsep="0">
<colspec colname="col1" colnum="1" />
Example goes here - it will be set in "code" type with white space preserved.
<!-- ================================ SPECIFICATION -->
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
<refsect1 id="specification"><title>Specification</title>
<para><imageobject><imagedata fileref="pdficon_small1.gif" format="gif" /></imageobject>
<olink uri="clCreateCommandQueueWithProperties">OpenCL Specification</olink>
<!-- ================================ ALSO SEE -->
<refsect1 id="seealso"><title>Also see</title>
<!-- ============================== COPYRIGHT -->
<!-- Content included from -->
<refsect3 id="Copyright"><title></title>
<imagedata fileref="KhronosLogo.jpg" format="jpg" />
<para />
<!-- 4-Nov-2015, API ver 2.1 rev 19; Ext ver 2.1 rev 10; C lang ver 2.0 rev 30 -->