1
<?xml version="1.0" encoding="UTF-8"?>
2
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
7
<keywordset><keyword>clIcdGetPlatformIDsKHR</keyword></keywordset>
10
<refentrytitle>clIcdGetPlatformIDsKHR</refentrytitle>
13
<year>2007-2011</year>
14
<holder>The Khronos Group Inc.
15
Permission is hereby granted, free of charge, to any person obtaining a
16
copy of this software and/or associated documentation files (the
17
"Materials"), to deal in the Materials without restriction, including
18
without limitation the rights to use, copy, modify, merge, publish,
19
distribute, sublicense, and/or sell copies of the Materials, and to
20
permit persons to whom the Materials are furnished to do so, subject to
21
the condition that this copyright notice and permission notice shall be included
22
in all copies or substantial portions of the Materials.</holder>
25
<manvolnum>3</manvolnum>
28
<!-- ================================ SYNOPSIS -->
30
<refnamediv id="clIcdGetPlatformIDsKHR">
31
<refname>clIcdGetPlatformIDsKHR</refname>
32
<refpurpose>Obtain the list of platforms accessible through the Khronos ICD Loader.</refpurpose>
34
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
38
<link xlink:href="scalarDataTypes.html">cl_int</link>
39
<function>clIcdGetPlatformIDsKHR</function>
42
<link xlink:href="scalarDataTypes.html">cl_uint</link>
43
<parameter>num_entries</parameter>
46
<link xlink:href="abstractDataTypes.html">cl_platform_id</link>
47
<parameter>*platforms</parameter>
50
<link xlink:href="scalarDataTypes.html">cl_uint</link>
51
<parameter>*num_platforms</parameter>
57
<!-- ================================ PARAMETERS -->
59
<refsect1 id="parameters"><title>Parameters</title>
63
<term><varname>num_entries</varname></term>
66
The number of <type>cl_platform_id</type> entries that can
67
be added to <varname>platforms</varname>. If <varname>platforms</varname>
68
is not NULL, then <varname>num_entries</varname> must be greater than zero.
74
<term><varname>platforms</varname></term>
77
Returns a list of OpenCL platforms available for access through the
78
Khronos ICD Loader. The <type>cl_platform_id</type> values returned in
79
<varname>platforms</varname> are ICD compatible and can be used to
80
identify a specific OpenCL platform. If the <varname>platforms</varname>
81
argument is NULL, then this argument is ignored. The number of
82
OpenCL platforms returned is the minimum of the value specified by
83
<varname>num_entries</varname> or the number of OpenCL platforms available.
89
<term><varname>num_platforms</varname></term>
92
Returns the number of OpenCL platforms available. If
93
<varname>num_platforms</varname> is NULL, then this argument is ignored.
100
<!-- ================================ NOTES -->
102
<refsect1 id="notes"><title>Notes</title>
104
This function is enabled by the <citerefentry><refentrytitle>cl_khr_icd</refentrytitle></citerefentry>
109
<!-- ================================ ERRORS -->
111
<refsect1 id="errors"><title>Errors</title>
113
Returns <errorname>CL_SUCCESS</errorname> if the function is executed
114
successfully. Otherwise, it returns the following:
117
<itemizedlist mark="disc">
119
<errorname>CL_PLATFORM_NOT_FOUND_KHR</errorname> if zero platforms are available.
123
<errorname>CL_INVALID_VALUE</errorname> if <varname>num_entries</varname>
124
is equal to zero and <varname>platforms</varname> is not NULL or if both
125
<varname>num_platforms</varname> and <varname>platforms</varname> are NULL.
131
<!-- ================================ EXAMPLE -->
132
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
134
<refsect2 id="example1">
139
<informaltable frame="none">
140
<tgroup cols="1" align="left" colsep="0" rowsep="0">
141
<colspec colname="col1" colnum="1" />
145
Example goes here - it will be set in "code" type with white space preserved.
154
<!-- ================================ SPECIFICATION -->
155
<!-- Set the "uri" attribute in the <olink /> element to the "named destination" for the PDF page
157
<refsect1 id="specification"><title>Specification</title>
158
<para><imageobject><imagedata fileref="pdficon_small1.gif" format="gif" /></imageobject>
159
<olink uri="clIcdGetPlatformIDsKHR">OpenCL Specification</olink>
163
<!-- ================================ ALSO SEE -->
165
<refsect1 id="seealso"><title>Also see</title>
167
<citerefentry><refentrytitle>clGetPlatformIDs</refentrytitle></citerefentry>,
168
<citerefentry><refentrytitle>cl_khr_icd</refentrytitle></citerefentry>
172
<!-- ============================== COPYRIGHT -->
173
<!-- Content included from copyright.inc.xsl -->
175
<refsect3 id="Copyright"><title></title>
177
<imagedata fileref="KhronosLogo.jpg" format="jpg" />