1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
"http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
<refentry>
<refentryinfo>
<keywordset><keyword>clGetDeviceInfo</keyword></keywordset>
</refentryinfo>
<refmeta>
<refentrytitle>clGetDeviceInfo</refentrytitle>
<refmiscinfo>
<copyright>
<year>2007-2011</year>
<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>
</copyright>
</refmiscinfo>
<manvolnum>3</manvolnum>
</refmeta>
<!-- ================================ SYNOPSIS -->
<refnamediv id="clGetDeviceInfo">
<refname>clGetDeviceInfo</refname>
<refpurpose>Get information about an OpenCL device.</refpurpose>
</refnamediv>
<refsynopsisdiv xmlns:xlink="http://www.w3.org/1999/xlink"><title></title>
<funcsynopsis>
<funcprototype>
<funcdef>
<link xlink:href="scalarDataTypes.html">cl_int</link>
<function>clGetDeviceInfo</function>
</funcdef>
<paramdef>
<link xlink:href="abstractDataTypes.html">cl_device_id</link>
<parameter>device</parameter>
</paramdef>
<paramdef>
<link xlink:href="enums.html#cl_device_info">cl_device_info</link>
<parameter>param_name</parameter>
</paramdef>
<paramdef>
<link xlink:href="scalarDataTypes.html">size_t</link>
<parameter>param_value_size</parameter>
</paramdef>
<paramdef>
<link xlink:href="scalarDataTypes.html">void</link>
<parameter>*param_value</parameter>
</paramdef>
<paramdef>
<link xlink:href="scalarDataTypes.html">size_t</link>
<parameter>*param_value_size_ret</parameter>
</paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
<!-- ================================ PARAMETERS -->
<refsect1 xmlns:xlink="http://www.w3.org/1999/xlink" id="parameters"><title>Parameters</title>
<variablelist>
<varlistentry>
<term><varname>device</varname></term>
<listitem>
<para>
May be a device returned by
<citerefentry><refentrytitle>clGetDeviceIDs</refentrytitle></citerefentry>
or a sub-device created by
<citerefentry><refentrytitle>clCreateSubDevices</refentrytitle></citerefentry>.
If <varname>device</varname> is a sub-device, the specific information for
the sub-device will be returned. The information that can be queried using
<function>clGetDeviceInfo</function> is specified in the table below.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>param_value</varname></term>
<listitem>
<para>
A pointer to memory location where appropriate values for a given
<varname>param_name</varname> as specified in the table below will be
returned. If <varname>param_value</varname> is NULL, it is ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>param_value_size</varname></term> <listitem>
<para>
Specifies the size in bytes of memory pointed to by
<varname>param_value</varname>. This size in bytes must be ≥ size of
return type specified in the table below.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>param_value_size_ret</varname></term> <listitem>
<para>
Returns the actual size in bytes of data being queried by
<varname>param_value</varname>. If <varname>param_value_size_ret</varname>
is NULL, it is ignored.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><varname>param_name</varname></term> <listitem>
<para>
An enumeration constant that identifies the device information being queried. It
can be one of the values as specified in the table below.
</para>
</listitem>
</varlistentry>
<!-- ================================ PARAMETER TABLE (OPTIONAL) -->
<varlistentry>
<term></term>
<listitem>
<!-- table 4.3 -->
<informaltable frame="all">
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<colspec colname="col1" colnum="1" />
<colspec colname="col2" colnum="2" />
<colspec colname="col3" colnum="3" />
<thead>
<row>
<entry>cl_device_info</entry>
<entry>Return Type</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><constant>CL_DEVICE_ADDRESS_BITS</constant></entry>
<entry>cl_uint</entry>
<entry>
The default compute device address space size specified as an unsigned
integer value in bits. Currently supported values are 32 or 64 bits.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_AVAILABLE</constant></entry>
<entry>cl_bool</entry>
<entry>
Is <constant>CL_TRUE</constant> if the device is available and
<constant>CL_FALSE</constant> if the device is not available.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_BUILT_IN_KERNELS</constant></entry>
<entry>char[]</entry>
<entry>
A semi-colon separated list of built-in kernels supported by the device.
An empty string is returned if no built-in kernels are supported by
the device.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_COMPILER_AVAILABLE</constant></entry>
<entry>cl_bool</entry>
<entry>
Is <constant>CL_FALSE</constant> if the implementation does
not have a compiler available to compile the program source.
Is <constant>CL_TRUE</constant> if the compiler is available. This can
be <constant>CL_FALSE</constant> for the embedded platform profile only.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_DOUBLE_FP_CONFIG</constant></entry>
<entry><para>cl_device_-</para><para>fp_config</para></entry>
<entry>
Describes double precision floating-point capability of the
OpenCL device. This is a bit-field that describes one or more of the following values:
<itemizedlist mark="disc">
<listitem><constant>CL_FP_DENORM</constant> - denorms are supported.</listitem>
<listitem><constant>CL_FP_INF_NAN</constant> - INF and NaNs are supported.</listitem>
<listitem><constant>CL_FP_ROUND_TO_NEAREST</constant> - round to nearest even rounding mode supported.</listitem>
<listitem><constant>CL_FP_ROUND_TO_ZERO</constant> - round to zero rounding mode supported.</listitem>
<listitem><constant>CL_FP_ROUND_TO_INF</constant> -
round to positive and negative infinity rounding modes supported.</listitem>
<listitem><constant>CP_FP_FMA</constant> - IEEE754-2008 fused multiply-add is supported. </listitem>
<listitem><constant>CL_FP_SOFT_FLOAT</constant> - Basic floating-point operations (such as
addition, subtraction, multiplication) are implemented in software.</listitem>
</itemizedlist>
<para>
Double precision is an optional feature so the mandated minimum double
precision floating-point capability is 0.
</para>
<para>
If double precision is supported by the device, then the minimum double
precision floatingpoint capability must be: <constant>CL_FP_FMA</constant>
| <constant>CL_FP_ROUND_TO_NEAREST</constant>
| <constant>CL_FP_ROUND_TO_ZERO</constant>
| <constant>CL_FP_ROUND_TO_INF</constant> |
<constant>CL_FP_INF_NAN</constant> | <constant>CL_FP_DENORM</constant>.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_ENDIAN_LITTLE</constant></entry>
<entry>cl_bool</entry>
<entry>
Is <constant>CL_TRUE</constant> if the OpenCL device is a little endian
device and <constant>CL_FALSE</constant> otherwise.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_ERROR_CORRECTION_SUPPORT</constant></entry>
<entry>Return type: cl_bool</entry>
<entry>
Is <constant>CL_TRUE</constant> if the device implements error correction
for all accesses to compute device memory (global and constant).
Is <constant>CL_FALSE</constant> if the device does not implement such
error correction.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_EXECUTION_CAPABILITIES</constant></entry>
<entry> <para>cl_device_-</para><para>exec_capabilities</para> </entry>
<entry>
Describes the execution capabilities of the device. This is
a bit-field that describes one or more of the following values:
<para><constant>CL_EXEC_KERNEL</constant> - The OpenCL device can execute
OpenCL kernels.</para> <para><constant>CL_EXEC_NATIVE_KERNEL</constant>
- The OpenCL device can execute native kernels.</para> <para>The mandated
minimum capability is <constant>CL_EXEC_KERNEL</constant>.</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_EXTENSIONS</constant></entry>
<entry>char[]</entry>
<entry>
Returns a space separated list of extension names (the extension names themselves do
not contain any spaces) supported by the device. The list of extension names returned
can be vendor supported extension names and one or more of the following Khronos
approved extension names:
<para>
<literallayout>
<citerefentry><refentrytitle>cl_khr_int64_base_atomics</refentrytitle></citerefentry>
<citerefentry><refentrytitle>cl_khr_int64_extended_atomics</refentrytitle></citerefentry>
<citerefentry><refentrytitle>cl_khr_fp16</refentrytitle></citerefentry>
<citerefentry><refentrytitle>cl_khr_gl_sharing</refentrytitle></citerefentry>
<citerefentry><refentrytitle>cl_khr_gl_event</refentrytitle></citerefentry>
<citerefentry><refentrytitle>cl_khr_d3d10_sharing</refentrytitle></citerefentry>
<citerefentry><refentrytitle>cl_khr_dx9_media_sharing</refentrytitle></citerefentry>
<citerefentry><refentrytitle>cl_khr_d3d11_sharing</refentrytitle></citerefentry>
</literallayout>
</para>
</entry>
<entry>
The following approved Khronos extension names must be returned by all device that support OpenCL C 1.2:
<para>
<literallayout>
cl_khr_global_int32_base_atomics
cl_khr_global_int32_extended_atomics
cl_khr_local_int32_base_atomics
cl_khr_local_int32_extended_atomics
cl_khr_byte_addressable_store
cl_khr_fp64
(for backward compatibility if double precision is supported)
</literallayout>
</para>
<para>
Please refer to the OpenCL 1.2 Extension Specification for a detailed description of these extensions.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_GLOBAL_MEM_CACHE_SIZE</constant></entry>
<entry>cl_ulong</entry>
<entry>Size of global memory cache in bytes.</entry>
</row>
<row>
<entry><constant>CL_DEVICE_GLOBAL_MEM_CACHE_TYPE</constant></entry>
<entry> <para>cl_device_mem-</para><para>_cache_type</para> </entry>
<entry>
Type of global memory cache supported. Valid values are:
<constant>CL_NONE</constant>, <constant>CL_READ_ONLY_CACHE</constant>,
and <constant>CL_READ_WRITE_CACHE</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE</constant></entry>
<entry>cl_uint</entry>
<entry>Size of global memory cache line in bytes.</entry>
</row>
<row>
<entry><constant>CL_DEVICE_GLOBAL_MEM_SIZE</constant></entry>
<entry>cl_ulong</entry>
<entry>Size of global device memory in bytes.</entry>
</row>
<row>
<entry><constant>CL_DEVICE_HALF_FP_CONFIG</constant></entry>
<entry><para>cl_device_-</para><para>fp_config</para></entry>
<entry>
Describes the OPTIONAL half precision floating-point capability of the
OpenCL device. This is a bit-field that describes one or more of the following values:
<itemizedlist mark="disc">
<listitem><constant>CL_FP_DENORM</constant> - denorms are supported.</listitem>
<listitem><constant>CL_FP_INF_NAN</constant> - INF and NaNs are supported.</listitem>
<listitem><constant>CL_FP_ROUND_TO_NEAREST</constant> - round to nearest even rounding mode supported.</listitem>
<listitem><constant>CL_FP_ROUND_TO_ZERO</constant> - round to zero rounding mode supported.</listitem>
<listitem><constant>CL_FP_ROUND_TO_INF</constant> - round
to +ve and -ve infinity rounding modes supported.</listitem>
<listitem><constant>CP_FP_FMA</constant> - IEEE754-2008 fused multiply-add is supported. </listitem>
<listitem>
<constant>CL_FP_SOFT_FLOAT</constant> - Basic floating-point operations
(such as addition, subtraction, multiplication) are implemented in software.</listitem>
</itemizedlist>
<para>
The required minimum half precision floating-point capability as
implemented by this extension is <constant>CL_FP_ROUND_TO_ZERO</constant>
or <constant>CL_FP_ROUND_TO_INF</constant> |
<constant>CL_FP_INF_NAN</constant>.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_HOST_UNIFIED_MEMORY</constant></entry>
<entry>cl_bool</entry>
<entry>
Is <constant>CL_TRUE</constant> if the device and the host have a unified
memory subsystem and is <constant>CL_FALSE</constant> otherwise.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_IMAGE_SUPPORT</constant></entry>
<entry>cl_bool</entry>
<entry>
Is <constant>CL_TRUE</constant> if images are supported by the OpenCL
device and <constant>CL_FALSE</constant> otherwise.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_IMAGE2D_MAX_HEIGHT</constant></entry>
<entry>size_t</entry>
<entry>
Max height of 2D image in pixels. The minimum value is 8192 if
<constant>CL_DEVICE_IMAGE_SUPPORT</constant> is <constant>CL_TRUE</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_IMAGE2D_MAX_WIDTH</constant></entry>
<entry>size_t</entry>
<entry>
Max width of 2D image or 1D image not created from a buffer object in pixels.
The minimum value is 8192 if <constant>CL_DEVICE_IMAGE_SUPPORT</constant>
is <constant>CL_TRUE</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_IMAGE3D_MAX_DEPTH</constant></entry>
<entry>size_t</entry>
<entry>
Max depth of 3D image in pixels. The minimum value is 2048 if
<constant>CL_DEVICE_IMAGE_SUPPORT</constant> is <constant>CL_TRUE</constant>.</entry>
</row>
<row>
<entry><constant>CL_DEVICE_IMAGE3D_MAX_HEIGHT</constant></entry>
<entry>size_t</entry>
<entry>
Max height of 3D image in pixels. The minimum value is 2048 if
<constant>CL_DEVICE_IMAGE_SUPPORT</constant> is <constant>CL_TRUE</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_IMAGE3D_MAX_WIDTH</constant></entry>
<entry>size_t</entry>
<entry>
Max width of 3D image in pixels. The minimum value is 2048 if
<constant>CL_DEVICE_IMAGE_SUPPORT</constant> is <constant>CL_TRUE</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_IMAGE_MAX_BUFFER_SIZE</constant></entry>
<entry>size_t</entry>
<entry>
Max number of pixels for a 1D image created from a buffer object.
The minimum value is 65536 if <constant>CL_DEVICE_IMAGE_SUPPORT</constant>
is <constant>CL_TRUE</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_IMAGE_MAX_ARRAY_SIZE</constant></entry>
<entry>size_t</entry>
<entry>
Max number of images in a 1D or 2D image array. The minimum value is 2048 if
<constant>CL_DEVICE_IMAGE_SUPPORT</constant> is <constant>CL_TRUE</constant>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_LINKER_AVAILABLE</constant></entry>
<entry>cl_bool</entry>
<entry>
Is <constant>CL_FALSE</constant> if the implementation does not
have a linker available. Is <constant>CL_TRUE</constant> if the
linker is available. This can be <constant>CL_FALSE for the embedded
platform profile only. This must be <constant>CL_TRUE</constant> if
<constant>CL_DEVICE_COMPILER_AVAILABLE</constant> is CL_TRUE</constant>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_LOCAL_MEM_SIZE</constant></entry>
<entry>cl_ulong</entry>
<entry>
Size of local memory arena in bytes. The minimum value is 32 KB for
devices that are not of type <constant>CL_DEVICE_TYPE_CUSTOM</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_LOCAL_MEM_TYPE</constant></entry>
<entry> <para>cl_device_-</para><para>local_mem_type</para></entry>
<entry>
Type of local memory supported. This can be set to
<constant>CL_LOCAL</constant> implying dedicated local memory storage
such as SRAM, or <constant>CL_GLOBAL</constant>. For custom devices,
<constant>CL_NONE</constant> can also be returned indicating no local
memory support.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_CLOCK_FREQUENCY</constant></entry>
<entry>cl_uint</entry>
<entry>Maximum configured clock frequency of the device in MHz.</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_COMPUTE_UNITS</constant></entry>
<entry>cl_uint</entry>
<entry>
The number of parallel compute units on the OpenCL device. A work-group executes
on a single compute unit. The minimum value is 1.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_CONSTANT_ARGS</constant></entry>
<entry>cl_uint</entry>
<entry>
Max number of arguments declared with the <citerefentry
href="constant"><refentrytitle>__constant</refentrytitle></citerefentry>
qualifier in a kernel. The minimum value is 8 for devices that are not
of type <constant>CL_DEVICE_TYPE_CUSTOM</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE</constant></entry>
<entry>cl_ulong</entry>
<entry>
Max size in bytes of a constant buffer allocation. The
minimum value is 64 KB for devices that are not of type
<constant>CL_DEVICE_TYPE_CUSTOM</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_MEM_ALLOC_SIZE</constant></entry>
<entry>cl_ulong</entry>
<entry>
Max size of memory object allocation in bytes. The minimum value is max (1/4th
of <constant>CL_DEVICE_GLOBAL_MEM_SIZE</constant>, 128*1024*1024) for devices
that are not of type <constant>CL_DEVICE_TYPE_CUSTOM</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_PARAMETER_SIZE</constant></entry>
<entry>size_t</entry>
<entry>
Max size in bytes of the arguments that can be passed to a
kernel. The minimum value is 1024 for devices that are not of type
<constant>CL_DEVICE_TYPE_CUSTOM</constant>. For this minimum value,
only a maximum of 128 arguments can be passed to a kernel.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_READ_IMAGE_ARGS</constant></entry>
<entry>cl_uint</entry>
<entry>
Max number of simultaneous image objects that can be read by a kernel. The
minimum value is 128 if <constant>CL_DEVICE_IMAGE_SUPPORT</constant>
is <constant>CL_TRUE</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_SAMPLERS</constant></entry>
<entry>cl_uint</entry>
<entry>
Maximum number of samplers that can be used in a kernel. The minimum
value is 16 if <constant>CL_DEVICE_IMAGE_SUPPORT</constant>
is <constant>CL_TRUE</constant>. (Also see
<citerefentry><refentrytitle>sampler_t</refentrytitle></citerefentry>.)
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_WORK_GROUP_SIZE</constant></entry>
<entry>size_t</entry>
<entry>
Maximum number of work-items in a work-group executing a kernel on a
single compute unit, using the data parallel execution model. (Refer to
<citerefentry><refentrytitle>clEnqueueNDRangeKernel</refentrytitle></citerefentry>).
The minimum value is 1.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS</constant></entry>
<entry>cl_uint</entry>
<entry>
Maximum dimensions that specify the global and local
work-item IDs used by the data parallel execution model. (Refer to
<citerefentry><refentrytitle>clEnqueueNDRangeKernel</refentrytitle></citerefentry>).
The minimum value is 3 for devices that are not of type
<constant>CL_DEVICE_TYPE_CUSTOM</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_WORK_ITEM_SIZES</constant></entry>
<entry>size_t[]</entry>
<entry>
<para>
Maximum number of work-items that can be
specified in each dimension of the work-group to
<citerefentry><refentrytitle>clEnqueueNDRangeKernel</refentrytitle></citerefentry>.
</para>
<para>
Returns <varname>n</varname> size_t entries, where
<varname>n</varname> is the value returned by the query for
<constant>CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS</constant>.
</para>
<para>
The minimum value is (1, 1, 1) for devices that are not of type
<constant>CL_DEVICE_TYPE_CUSTOM</constant>.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MAX_WRITE_IMAGE_ARGS</constant></entry>
<entry>cl_uint</entry>
<entry>
Max number of simultaneous image objects that can
be written to by a kernel. The minimum value is 8 if
<constant>CL_DEVICE_IMAGE_SUPPORT</constant> is <constant>CL_TRUE</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MEM_BASE_ADDR_ALIGN</constant></entry>
<entry>cl_uint</entry>
<entry>
The minimum value is the size (in bits) of the largest OpenCL built-in
data type supported by the device (<type>long16</type> in FULL profile,
<type>long16</type> or <type>int16</type> in EMBEDDED profile) for devices
that are not of type <constant>CL_DEVICE_TYPE_CUSTOM</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE</constant></entry>
<entry>cl_uint</entry>
<entry>
Deprecated in OpenCL 1.2. The smallest alignment in bytes which can be
used for any data type.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_NAME</constant></entry>
<entry>char[]</entry>
<entry>Device name string.</entry>
</row>
<row>
<entry><constant>CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR</constant>
<para><constant>CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT</constant></para>
<para><constant>CL_DEVICE_NATIVE_VECTOR_WIDTH_INT</constant></para>
<para><constant>CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG</constant></para>
<para><constant>CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT</constant></para>
<para><constant>CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE</constant></para>
<para><constant>CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF</constant></para></entry>
<entry>cl_uint</entry>
<entry>
<para>
Returns the native ISA vector width. The vector width is defined as
the number of scalar elements that can be stored in the vector.
</para>
<para>
If double precision is not supported,
<constant>CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE</constant> must return 0.
</para>
<para>
If the
<citerefentry><refentrytitle>cl_khr_fp16</refentrytitle></citerefentry>
extension is not supported,
<constant>CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF</constant> must return 0.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_OPENCL_C_VERSION</constant></entry>
<entry>char[]</entry>
<entry>
<para>
OpenCL C version string. Returns the highest OpenCL C version
supported by the compiler for this device that is not of type
<constant>CL_DEVICE_TYPE_CUSTOM</constant>. This version string has
the following format:
</para>
<para>
<varname>
OpenCL<space>C<space><major_version.minor_version><space><vendor-specific
information> </varname>
</para>
<para>
The <varname>major_version.minor_version</varname> value returned must
be 1.2 if <constant>CL_DEVICE_VERSION</constant> is OpenCL 1.2.
</para>
<para>
The <varname>major_version.minor_version</varname> value returned must
be 1.1 if <constant>CL_DEVICE_VERSION</constant> is OpenCL 1.1.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PARENT_DEVICE</constant></entry>
<entry>cl_device_id</entry>
<entry>
Returns the cl_device_id of the parent device to which this sub-device
belongs. If device is a root-level device, a NULL value is returned.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PARTITION_MAX_SUB_DEVICES</constant></entry>
<entry>cl_uint</entry>
<entry>
Returns the maximum number of sub-devices that can be created
when a device is partitioned. The value returned cannot exceed
<constant>CL_DEVICE_MAX_COMPUTE_UNITS</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PARTITION_PROPERTIES</constant></entry>
<entry><para>cl_device_partit-</para><para>ion_property[]</para></entry>
<entry>
Returns the list of partition types supported by device. This is an array of
<varname>cl_device_partition_property</varname> values drawn from the following list:
<itemizedlist mark="disc">
<listitem><constant>CL_DEVICE_PARTITION_EQUALLY</constant></listitem>
<listitem><constant>CL_DEVICE_PARTITION_BY_COUNTS</constant></listitem>
<listitem><constant>CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN</constant></listitem>
</itemizedlist>
If the device does not support any partition types, a value of 0 will be returned.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PARTITION_AFFINITY_DOMAIN</constant></entry>
<entry><para>cl_device_aff-</para><para>inity_domain</para></entry>
<entry>
Returns the list of supported affinity domains for partitioning the device using
<constant>CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN</constant>.
This is a bit-field that describes one or more of the following values:
<itemizedlist mark="disc">
<listitem><constant>CL_DEVICE_AFFINITY_DOMAIN_NUMA</constant></listitem>
<listitem><constant>CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE</constant></listitem>
<listitem><constant>CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE</constant></listitem>
<listitem><constant>CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE</constant></listitem>
<listitem><constant>CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE</constant></listitem>
<listitem><constant>CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE</constant></listitem>
</itemizedlist>
If the device does not support any affinity domains, a value of 0 will be returned.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PARTITION_TYPE</constant></entry>
<entry><para>cl_device_part-</para><para>ition_property[]</para></entry>
<entry>
Returns the properties argument specified in
<citerefentry><refentrytitle>clCreateSubDevices</refentrytitle></citerefentry>
if <varname>device</varname> is a subdevice. Otherwise the implementation
may either return a <varname>param_value_size_ret</varname> of 0 i.e. there
is no partition type associated with <varname>device</varname> or can
return a property value of 0 (where 0 is used to terminate the partition
property list) in the memory that <varname>param_value</varname> points to.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PLATFORM</constant></entry>
<entry><link xlink:href="abstractDataTypes.html">cl_platform_id</link></entry>
<entry>The platform associated with this device.</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR</constant>
<para><constant>CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT</constant></para>
<para><constant>CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT</constant></para>
<para><constant>CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG</constant></para>
<para><constant>CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT</constant></para>
<para><constant>CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE</constant></para>
<para><constant>CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF</constant></para></entry>
<entry>cl_uint</entry>
<entry>
<para>
Preferred native vector width size for built-in scalar types that can
be put into vectors. The vector width is defined as the number of scalar
elements that can be stored in the vector.
</para>
<para>
If double precision is not supported,
<constant>CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE</constant> must return 0.
</para>
<para>
If the
<citerefentry><refentrytitle>cl_khr_fp16</refentrytitle></citerefentry>
extension is not supported,
<constant>CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF</constant> must return 0.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PRINTF_BUFFER_SIZE</constant></entry>
<entry>size_t</entry>
<entry>
Maximum size of the internal buffer that holds the output of <citerefentry
href="printfFunction"><refentrytitle>printf</refentrytitle></citerefentry>
calls from a kernel. The minimum value for the FULL profile is 1 MB.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PREFERRED_INTEROP_USER_SYNC</constant></entry>
<entry>cl_bool</entry>
<entry>
Is <constant>CL_TRUE</constant> if the device's preference is for the user
to be responsible for synchronization, when sharing memory objects between
OpenCL and other APIs such as DirectX, <constant>CL_FALSE</constant> if the
device / implementation has a performant path for performing synchronization
of memory object shared between OpenCL and other APIs such as DirectX
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PROFILE</constant></entry>
<entry>char[]</entry>
<entry>
<para>
OpenCL profile string. Returns the profile name supported by the device
(see note). The profile name returned can be one of the following strings:
</para>
<para>
FULL_PROFILE - if the device supports the OpenCL specification
(functionality defined as part of the core specification and does not
require any extensions to be supported).
</para>
<para>
EMBEDDED_PROFILE - if the device supports the OpenCL embedded profile.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_PROFILING_TIMER_RESOLUTION</constant></entry>
<entry>size_t</entry>
<entry>Describes the resolution of device timer. This is measured in nanoseconds.</entry>
</row>
<row>
<entry><constant>CL_DEVICE_QUEUE_PROPERTIES</constant></entry>
<entry>
<para>cl_command_-</para>
<para>queue_properties</para>
</entry>
<entry>
<para>
Describes the command-queue properties supported by the device. This is
a bit-field that describes one or more of the following values:
</para>
<para><constant>CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE</constant></para>
<para><constant>CL_QUEUE_PROFILING_ENABLE</constant></para>
<para>
These properties are described in the table for
<citerefentry><refentrytitle>clCreateCommandQueue</refentrytitle></citerefentry>.
The mandated minimum capability is
<constant>CL_QUEUE_PROFILING_ENABLE</constant>.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_REFERENCE_COUNT</constant></entry>
<entry>cl_uint</entry>
<entry>
Returns the device reference count. If the device is a root-level device,
a reference count of one is returned.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_SINGLE_FP_CONFIG</constant></entry>
<entry><para>cl_device_-</para><para>fp_config</para></entry>
<entry>
<para>
Describes single precision floating-point capability of the device. This
is a bit-field that describes one or more of the following values:
</para>
<para><constant>CL_FP_DENORM</constant> - denorms are supported</para>
<para><constant>CL_FP_INF_NAN</constant> - INF and quiet NaNs are supported</para>
<para><constant>CL_FP_ROUND_TO_NEAREST</constant> - round to nearest even rounding mode supported</para>
<para><constant>CL_FP_ROUND_TO_ZERO</constant> - round to zero rounding mode supported</para>
<para><constant>CL_FP_ROUND_TO_INF</constant> - round to +ve and -ve infinity rounding modes supported</para>
<para><constant>CL_FP_FMA</constant> - IEEE754-2008 fused multiply-add is supported</para>
<para>
<constant>CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT</constant> - divide and
sqrt are correctly rounded as defined by the IEEE754 specification.
</para>
<para>
<constant>CL_FP_SOFT_FLOAT</constant> - Basic floating-point operations
(such as addition, subtraction, multiplication) are implemented in
software.
</para>
<para>
The mandated minimum floating-point capability for devices that
are not of type <constant>CL_DEVICE_TYPE_CUSTOM</constant>
is <constant>CL_FP_ROUND_TO_NEAREST</constant> |
<constant>CL_FP_INF_NAN</constant>.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_TYPE</constant></entry>
<entry>cl_device_type</entry>
<entry>
The OpenCL device type. Currently supported values are one of or
a combination of: <constant>CL_DEVICE_TYPE_CPU</constant>,
<constant>CL_DEVICE_TYPE_GPU</constant>,
<constant>CL_DEVICE_TYPE_ACCELERATOR</constant>,
<constant>CL_DEVICE_TYPE_DEFAULT</constant>, a combination of the above
types, or <constant>CL_DEVICE_TYPE_CUSTOM</constant>.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_VENDOR</constant></entry>
<entry>char[]</entry>
<entry>Vendor name string.</entry>
</row>
<row>
<entry><constant>CL_DEVICE_VENDOR_ID</constant></entry>
<entry>cl_uint</entry>
<entry>
A unique device vendor identifier. An example of a unique device identifier
could be the PCIe ID.
</entry>
</row>
<row>
<entry><constant>CL_DEVICE_VERSION</constant></entry>
<entry>char[]</entry>
<entry>
<para>
OpenCL version string. Returns the OpenCL version supported by the
device. This version string has the following format:
</para>
<para>
<varname>
OpenCL<space><major_version.minor_version><space><vendor-specific
information> </varname>
</para>
<para>
The <varname>major_version.minor_version</varname> value returned will
be 1.1.
</para>
</entry>
</row>
<row>
<entry><constant>CL_DRIVER_VERSION</constant></entry>
<entry>char[]</entry>
<entry>
OpenCL software driver version string in the form
<varname>major_number.minor_number</varname>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</listitem>
</varlistentry>
<!-- ================================ END PARAMETER TABLE -->
</variablelist>
</refsect1>
<!-- ================================ NOTES -->
<refsect1 id="notes"><title>Notes</title>
<para>
<constant>CL_DEVICE_PROFILE</constant>: The platform profile returns the profile
that is implemented by the OpenCL framework. If the platform profile returned is
FULL_PROFILE, the OpenCL framework will support devices that are FULL_PROFILE and may
also support devices that are <constant>EMBEDDED_PROFILE</constant>. The compiler must
be available for all devices i.e. <constant>CL_DEVICE_COMPILER_AVAILABLE</constant>
is <constant>CL_TRUE</constant>. If the platform profile returned
is <constant>EMBEDDED_PROFILE</constant>, then devices that are only
<constant>EMBEDDED_PROFILE</constant> are supported.
</para>
<para>
The device queries described the table above should return the
same information for a root-level device i.e. a device returned by
<citerefentry><refentrytitle>clGetDeviceIDs</refentrytitle></citerefentry> and any
sub-devices created from this device except for the following queries:
<itemizedlist mark="disc">
<listitem><constant>CL_DEVICE_GLOBAL_MEM_CACHE_SIZE</constant></listitem>
<listitem><constant>CL_DEVICE_BUILT_IN_KERNELS</constant></listitem>
<listitem><constant>CL_DEVICE_PARENT_DEVICE</constant></listitem>
<listitem><constant>CL_DEVICE_PARTITION_TYPE</constant></listitem>
<listitem><constant>CL_DEVICE_REFERENCE_COUNT</constant></listitem>
</itemizedlist>
</para>
</refsect1>
<!-- ================================ ERRORS -->
<refsect1 id="errors"><title>Errors</title>
<para>
<function>clGetDeviceInfo</function> returns <errorname>CL_SUCCESS</errorname> if the
function is executed successfully. Otherwise, it returns the following:
</para>
<itemizedlist mark="disc">
<listitem>
<errorname>CL_INVALID_DEVICE</errorname> if <varname>device</varname> is not valid.
</listitem>
<listitem>
<errorname>CL_INVALID_VALUE</errorname> if <varname>param_name</varname>
is not one of the supported values or if size in bytes specified by
<varname>param_value_size</varname> is less than size of return type as shown in the
table above and <varname>param_value</varname> is not a <errorname>NULL</errorname>
value or if param_name is a value that is available as an extension and the corresponding
extension is not supported by the device.
</listitem>
<listitem>
<errorname>CL_OUT_OF_RESOURCES</errorname> if there is a failure to allocate resources
required by the OpenCL implementation on the device.
</listitem>
<listitem>
<errorname>CL_OUT_OF_HOST_MEMORY</errorname> if there is a failure to allocate
resources required by the OpenCL implementation on the host.
</listitem>
</itemizedlist>
</refsect1>
<!-- ================================ EXAMPLE -->
<!-- DO NOT DELETE IN CASE AN EXAMPLE IS ADDED IN THE FUTURE -->
<!--
<refsect2 id="example1">
<title>
Example
</title>
<informaltable frame="none">
<tgroup cols="1" align="left" colsep="0" rowsep="0">
<colspec colname="col1" colnum="1" />
<tbody>
<row>
<entry>
Example goes here - it will be set in "code" type with white space preserved.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect2>
-->
<!-- ================================ 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="clGetDeviceInfo">OpenCL Specification</olink>
</para>
</refsect1>
<!-- ================================ ALSO SEE -->
<refsect1 id="seealso"><title>Also see</title>
<para>
<citerefentry><refentrytitle>clGetDeviceIDs</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>cl_khr_fp64</refentrytitle></citerefentry>,
<citerefentry href="constant"><refentrytitle>__constant</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>clCreateCommandQueue</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>clRetainCommandQueue</refentrytitle></citerefentry>,
<citerefentry><refentrytitle>clEnqueueNDRangeKernel</refentrytitle></citerefentry>
</para>
</refsect1>
<!-- ============================== COPYRIGHT -->
<!-- Content included from copyright.inc.xsl -->
<refsect3 id="Copyright"><title></title>
<imageobject>
<imagedata fileref="KhronosLogo.jpg" format="jpg" />
</imageobject>
<para />
</refsect3>
<!-- 28-Oct-2011 -->
</refentry>
|