/usr/share/doc/erlang-cl/html/cl.html is in erlang-cl 1.2.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module cl</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
<body bgcolor="white">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<hr>
<h1>Module cl</h1>
<ul class="index"><li><a href="#description">Description</a></li><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>The erlang api for <a href="http://www.khronos.org/opencl/">OpenCL</a>.
<h2><a name="description">Description</a></h2><p>The erlang api for <a href="http://www.khronos.org/opencl/">OpenCL</a>.</p>
<p>OpenCL (Open Computing Language) is an open royalty-free standard
for general purpose parallel programming across CPUs, GPUs and
other processors, giving software developers portable and efficient
access to the power of these heterogeneous processing platforms.</p>
<p>OpenCL supports a wide range of applications, ranging from embedded
and consumer software to HPC solutions, through a low-level,
high-performance, portable abstraction. By creating an efficient,
close-to-the-metal programming interface, OpenCL will form the
foundation layer of a parallel computing ecosystem of
platform-independent tools, middleware and applications.</p>
<p>OpenCL consists of an API for coordinating parallel computation
across heterogeneous processors; and a cross-platform programming
language with a well-specified computation environment. The OpenCL
standard:</p>
<p><li> Supports both data- and task-based parallel programming models</li>
<li> Utilizes a subset of ISO C99 with extensions for parallelism </li>
<li> Defines consistent numerical requirements based on IEEE 754</li>
<li> Defines a configuration profile for handheld and embedded devices</li>
<li> Efficiently interoperates with OpenGL, OpenGL ES, and other graphics APIs</li></p>
<p>The specification is divided into a core specification that any
OpenCL compliant implementation must support; a handheld/embedded
profile which relaxes the OpenCL compliance requirements for
handheld and embedded devices; and a set of optional extensions
that are likely to move into the core specification in later
revisions of the OpenCL specification.</p>
<p>The documentation is re-used with the following copyright:</p>
Copyright © 2007-2009 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.
<h2><a name="types">Data Types</a></h2>
<h3 class="typedecl"><a name="type-cl_addressing_mode">cl_addressing_mode()</a></h3>
<p><tt>cl_addressing_mode() = {none | clamp_to_edge | clamp | repeat}</tt></p>
<h3 class="typedecl"><a name="type-cl_char">cl_char()</a></h3>
<p><tt>cl_char() = integer()</tt></p>
<h3 class="typedecl"><a name="type-cl_context">cl_context()</a></h3>
<p><tt>cl_context() = {{object, 3, non_neg_integer()}}</tt></p>
<h3 class="typedecl"><a name="type-cl_context_info">cl_context_info()</a></h3>
<p><tt>cl_context_info() = {{reference_count, <a href="#type-cl_uint">cl_uint()</a>}, {devices, [<a href="#type-cl_device">cl_device()</a>]}, {properties, [<a href="#type-cl_int">cl_int()</a>]}}</tt></p>
<h3 class="typedecl"><a name="type-cl_context_info_key">cl_context_info_key()</a></h3>
<p><tt>cl_context_info_key() = {reference_count | devices | properties}</tt></p>
<h3 class="typedecl"><a name="type-cl_device_id">cl_device_id()</a></h3>
<p><tt>cl_device_id() = {{object, 2, non_neg_integer()}}</tt></p>
<h3 class="typedecl"><a name="type-cl_device_info">cl_device_info()</a></h3>
<p><tt>cl_device_info() = {<a href="#type-cl_device_info_key">cl_device_info_key()</a>, term()}</tt></p>
<h3 class="typedecl"><a name="type-cl_device_info_key">cl_device_info_key()</a></h3>
<p><tt>cl_device_info_key() = {type | vendor_id | max_compute_units | max_work_item_dimensions | max_work_group_size | max_work_item_sizes | preferred_vector_width_char | preferred_vector_width_short | preferred_vector_width_int | preferred_vector_width_long | preferred_vector_width_float | preferred_vector_width_double | max_clock_frequency | address_bits | max_read_image_args | max_write_image_args | max_mem_alloc_size | image2d_max_width | image2d_max_height | image3d_max_width | image3d_max_height | image3d_max_depth | image_support | max_parameter_size | max_samplers | mem_base_addr_align | min_data_type_align_size | single_fp_config | global_mem_cache_type | global_mem_cacheline_size | global_mem_cache_size | global_mem_size | max_constant_buffer_size | max_constant_args | local_mem_type | local_mem_size | error_correction_support | profiling_timer_resolution | endian_little | available | compiler_available | execution_capabilities | queue_properties | name | vendor | driver_version | profile | version | extensions | platform}</tt></p>
<h3 class="typedecl"><a name="type-cl_device_type">cl_device_type()</a></h3>
<p><tt>cl_device_type() = {gpu | cpu | accelerator | all | default}</tt></p>
<h3 class="typedecl"><a name="type-cl_device_types">cl_device_types()</a></h3>
<p><tt>cl_device_types() = {<a href="#type-cl_device_type">cl_device_type()</a> | [<a href="#type-cl_device_type">cl_device_type()</a>]}</tt></p>
<h3 class="typedecl"><a name="type-cl_double">cl_double()</a></h3>
<p><tt>cl_double() = float()</tt></p>
<h3 class="typedecl"><a name="type-cl_error">cl_error()</a></h3>
<p><tt>cl_error() = {device_not_found | device_not_available | compiler_not_available | mem_object_allocation_failure | out_of_resources | out_of_host_memory | profiling_info_not_available | mem_copy_overlap | image_format_mismatch | image_format_not_supported | build_program_failure | map_failure | invalid_value | 'invalid_device type' | invalid_platform | invalid_device | invalid_context | invalid_queue_properties | invalid_command_queue | invalid_host_ptr | invalid_mem_object | invalid_image_format_descriptor | invalid_image_size | invalid_sampler | invalid_binary | invalid_build_options | invalid_program | invalid_program_executable | invalid_kernel_name | invalid_kernel_definition | invalid_kernel | invalid_arg_index | invalid_arg_value | invalid_arg_size | invalid_kernel_args | invalid_work_dimension | invalid_work_group_size | 'invalid_work_item size' | invalid_global_offset | invalid_event_wait_list | invalid_event | invalid_operation | invalid_gl_object | invalid_buffer_size | invalid_mip_level | unknown}</tt></p>
<h3 class="typedecl"><a name="type-cl_event">cl_event()</a></h3>
<p><tt>cl_event() = {{object, 9, non_neg_integer()}}</tt></p>
<h3 class="typedecl"><a name="type-cl_filter_mode">cl_filter_mode()</a></h3>
<p><tt>cl_filter_mode() = {nearest | linear}</tt></p>
<h3 class="typedecl"><a name="type-cl_float">cl_float()</a></h3>
<p><tt>cl_float() = float()</tt></p>
<h3 class="typedecl"><a name="type-cl_half">cl_half()</a></h3>
<p><tt>cl_half() = float()</tt></p>
<h3 class="typedecl"><a name="type-cl_int">cl_int()</a></h3>
<p><tt>cl_int() = integer()</tt></p>
<h3 class="typedecl"><a name="type-cl_kernel">cl_kernel()</a></h3>
<p><tt>cl_kernel() = {{object, 8, non_neg_integer()}}</tt></p>
<h3 class="typedecl"><a name="type-cl_kernel_arg">cl_kernel_arg()</a></h3>
<p><tt>cl_kernel_arg() = integer() | float() | binary()</tt></p>
<h3 class="typedecl"><a name="type-cl_long">cl_long()</a></h3>
<p><tt>cl_long() = integer()</tt></p>
<h3 class="typedecl"><a name="type-cl_mem">cl_mem()</a></h3>
<p><tt>cl_mem() = {{object, 5, non_neg_integer()}}</tt></p>
<h3 class="typedecl"><a name="type-cl_mem_flag">cl_mem_flag()</a></h3>
<p><tt>cl_mem_flag() = {read_write | write_only | read_only | use_host_ptr | alloc_host_ptr | copy_host_ptr}</tt></p>
<h3 class="typedecl"><a name="type-cl_platform_id">cl_platform_id()</a></h3>
<p><tt>cl_platform_id() = {{object, 1, non_neg_integer()}}</tt></p>
<h3 class="typedecl"><a name="type-cl_platform_info">cl_platform_info()</a></h3>
<p><tt>cl_platform_info() = {profile, string()} | {version, string()} | {name, string()} | {vendor, string()} | {extensions, string()}</tt></p>
<h3 class="typedecl"><a name="type-cl_platform_info_key">cl_platform_info_key()</a></h3>
<p><tt>cl_platform_info_key() = profile | name | vendor | extensions</tt></p>
<h3 class="typedecl"><a name="type-cl_program">cl_program()</a></h3>
<p><tt>cl_program() = {{object, 7, non_neg_integer()}}</tt></p>
<h3 class="typedecl"><a name="type-cl_queue">cl_queue()</a></h3>
<p><tt>cl_queue() = {{object, 4, non_neg_integer()}}</tt></p>
<h3 class="typedecl"><a name="type-cl_queue_property">cl_queue_property()</a></h3>
<p><tt>cl_queue_property() = {out_of_order_exec_mode_enable | profiling_enabled}</tt></p>
<h3 class="typedecl"><a name="type-cl_sampler">cl_sampler()</a></h3>
<p><tt>cl_sampler() = {{object, 6, non_neg_integer()}}</tt></p>
<h3 class="typedecl"><a name="type-cl_short">cl_short()</a></h3>
<p><tt>cl_short() = integer()</tt></p>
<h3 class="typedecl"><a name="type-cl_uchar">cl_uchar()</a></h3>
<p><tt>cl_uchar() = non_neg_integer()</tt></p>
<h3 class="typedecl"><a name="type-cl_uint">cl_uint()</a></h3>
<p><tt>cl_uint() = non_neg_integer()</tt></p>
<h3 class="typedecl"><a name="type-cl_ulong">cl_ulong()</a></h3>
<p><tt>cl_ulong() = non_neg_integer()</tt></p>
<h3 class="typedecl"><a name="type-cl_ushort">cl_ushort()</a></h3>
<p><tt>cl_ushort() = non_neg_integer()</tt></p>
<h3 class="typedecl"><a name="type-start_arg">start_arg()</a></h3>
<p><tt>start_arg() = {{debug, boolean()}}</tt></p>
<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#async_build_program-3">async_build_program/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#async_finish-1">async_finish/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#async_flush-1">async_flush/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#async_wait_for_event-1">async_wait_for_event/1</a></td><td> Initiate an asynchronous wait operation.</td></tr>
<tr><td valign="top"><a href="#build_program-3">build_program/3</a></td><td>Builds (compiles and links) a program executable from the
program source or binary.</td></tr>
<tr><td valign="top"><a href="#context_info-0">context_info/0</a></td><td>List context info queries.</td></tr>
<tr><td valign="top"><a href="#create_buffer-3">create_buffer/3</a></td><td>Equivalent to <a href="#create_buffer-4"><tt>create_buffer(Context, Flags, Size, <<>>)</tt></a>.
</td></tr>
<tr><td valign="top"><a href="#create_buffer-4">create_buffer/4</a></td><td> Creates a buffer object.</td></tr>
<tr><td valign="top"><a href="#create_context-1">create_context/1</a></td><td>Creates an OpenCL context.</td></tr>
<tr><td valign="top"><a href="#create_context_from_type-1">create_context_from_type/1</a></td><td>Create an OpenCL context from a device type that identifies the specific device(s) to use.</td></tr>
<tr><td valign="top"><a href="#create_image-5">create_image/5</a></td><td></td></tr>
<tr><td valign="top"><a href="#create_image2d-7">create_image2d/7</a></td><td></td></tr>
<tr><td valign="top"><a href="#create_image3d-9">create_image3d/9</a></td><td></td></tr>
<tr><td valign="top"><a href="#create_kernel-2">create_kernel/2</a></td><td> Creates a kernal object.</td></tr>
<tr><td valign="top"><a href="#create_kernels_in_program-1">create_kernels_in_program/1</a></td><td>Creates kernel objects for all kernel functions in a program object.</td></tr>
<tr><td valign="top"><a href="#create_program_with_binary-3">create_program_with_binary/3</a></td><td> Creates a program object for a context, and loads specified binary data into the program object.</td></tr>
<tr><td valign="top"><a href="#create_program_with_source-2">create_program_with_source/2</a></td><td>Creates a program object for a context,
and loads the source code specified by the text strings in the
strings array into the program object.</td></tr>
<tr><td valign="top"><a href="#create_queue-3">create_queue/3</a></td><td>Create a command-queue on a specific device.</td></tr>
<tr><td valign="top"><a href="#create_sampler-4">create_sampler/4</a></td><td>Creates a sampler object.</td></tr>
<tr><td valign="top"><a href="#device_info-0">device_info/0</a></td><td>Return a list of possible device info queries.</td></tr>
<tr><td valign="top"><a href="#device_info_10-1">device_info_10/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#device_info_11-1">device_info_11/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#device_info_12-1">device_info_12/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_barrier-1">enqueue_barrier/1</a></td><td>A synchronization point that enqueues a barrier operation.</td></tr>
<tr><td valign="top"><a href="#enqueue_barrier_with_wait_list-2">enqueue_barrier_with_wait_list/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_copy_buffer_to_image-7">enqueue_copy_buffer_to_image/7</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_copy_image-6">enqueue_copy_image/6</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_copy_image_to_buffer-7">enqueue_copy_image_to_buffer/7</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_map_buffer-6">enqueue_map_buffer/6</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_map_image-6">enqueue_map_image/6</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_marker-1">enqueue_marker/1</a></td><td> Enqueues a marker command.</td></tr>
<tr><td valign="top"><a href="#enqueue_marker_with_wait_list-2">enqueue_marker_with_wait_list/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_nd_range_kernel-5">enqueue_nd_range_kernel/5</a></td><td>Enqueues a command to execute a kernel on a device.</td></tr>
<tr><td valign="top"><a href="#enqueue_nd_range_kernel-6">enqueue_nd_range_kernel/6</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_read_buffer-5">enqueue_read_buffer/5</a></td><td>Enqueue commands to read from a buffer object to host memory.</td></tr>
<tr><td valign="top"><a href="#enqueue_read_image-7">enqueue_read_image/7</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_task-3">enqueue_task/3</a></td><td>Enqueues a command to execute a kernel on a device.</td></tr>
<tr><td valign="top"><a href="#enqueue_task-4">enqueue_task/4</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_unmap_mem_object-3">enqueue_unmap_mem_object/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_wait_for_events-2">enqueue_wait_for_events/2</a></td><td>Enqueues a wait for a specific event or a list of events
to complete before any future commands queued in the command-queue are
executed.</td></tr>
<tr><td valign="top"><a href="#enqueue_write_buffer-6">enqueue_write_buffer/6</a></td><td>Enqueue commands to write to a buffer object from host memory.</td></tr>
<tr><td valign="top"><a href="#enqueue_write_buffer-7">enqueue_write_buffer/7</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_write_image-8">enqueue_write_image/8</a></td><td></td></tr>
<tr><td valign="top"><a href="#enqueue_write_image-9">enqueue_write_image/9</a></td><td></td></tr>
<tr><td valign="top"><a href="#event_info-0">event_info/0</a></td><td>Returns all possible event_info items.</td></tr>
<tr><td valign="top"><a href="#finish-1">finish/1</a></td><td>Blocks until all previously queued OpenCL commands
in a command-queue are issued to the associated device and have
completed.</td></tr>
<tr><td valign="top"><a href="#flush-1">flush/1</a></td><td>Issues all previously queued OpenCL commands
in a command-queue to the device associated with the command-queue.</td></tr>
<tr><td valign="top"><a href="#get_context_info-1">get_context_info/1</a></td><td>Get all context info.</td></tr>
<tr><td valign="top"><a href="#get_context_info-2">get_context_info/2</a></td><td> Query information about a context.</td></tr>
<tr><td valign="top"><a href="#get_device_ids-0">get_device_ids/0</a></td><td>Equivalent to <a href="#get_devive_ids-2"><tt>get_devive_ids(0, all)</tt></a>.
</td></tr>
<tr><td valign="top"><a href="#get_device_ids-2">get_device_ids/2</a></td><td>Obtain the list of devices available on a platform.</td></tr>
<tr><td valign="top"><a href="#get_device_info-1">get_device_info/1</a></td><td>Get all device info.</td></tr>
<tr><td valign="top"><a href="#get_device_info-2">get_device_info/2</a></td><td>Get information about an OpenCL device.</td></tr>
<tr><td valign="top"><a href="#get_event_info-1">get_event_info/1</a></td><td>Returns all specific information about the event object.</td></tr>
<tr><td valign="top"><a href="#get_event_info-2">get_event_info/2</a></td><td>Returns specific information about the event object.</td></tr>
<tr><td valign="top"><a href="#get_image_info-1">get_image_info/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#get_image_info-2">get_image_info/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#get_kernel_info-1">get_kernel_info/1</a></td><td>Returns all information about the kernel object.</td></tr>
<tr><td valign="top"><a href="#get_kernel_info-2">get_kernel_info/2</a></td><td>Returns specific information about the kernel object.</td></tr>
<tr><td valign="top"><a href="#get_kernel_workgroup_info-2">get_kernel_workgroup_info/2</a></td><td>Returns all information about the kernel object that may be
specific to a device.</td></tr>
<tr><td valign="top"><a href="#get_kernel_workgroup_info-3">get_kernel_workgroup_info/3</a></td><td>Returns specific information about the kernel object that may
be specific to a device.</td></tr>
<tr><td valign="top"><a href="#get_mem_object_info-1">get_mem_object_info/1</a></td><td>Used to get all information that is common to all memory objects
(buffer and image objects).</td></tr>
<tr><td valign="top"><a href="#get_mem_object_info-2">get_mem_object_info/2</a></td><td>Used to get <c>InfoType</c> information that is common to all memory objects
(buffer and image objects).</td></tr>
<tr><td valign="top"><a href="#get_platform_ids-0">get_platform_ids/0</a></td><td>Obtain the list of platforms available.</td></tr>
<tr><td valign="top"><a href="#get_platform_info-1">get_platform_info/1</a></td><td>Get all information about the OpenCL platform.</td></tr>
<tr><td valign="top"><a href="#get_platform_info-2">get_platform_info/2</a></td><td>Get specific information about the OpenCL platform.</td></tr>
<tr><td valign="top"><a href="#get_program_build_info-2">get_program_build_info/2</a></td><td>Returns all build information for each device in the program object.</td></tr>
<tr><td valign="top"><a href="#get_program_build_info-3">get_program_build_info/3</a></td><td>Returns specific build information for each device in the program object.</td></tr>
<tr><td valign="top"><a href="#get_program_info-1">get_program_info/1</a></td><td> Returns all information about the program object.</td></tr>
<tr><td valign="top"><a href="#get_program_info-2">get_program_info/2</a></td><td> Returns specific information about the program object.</td></tr>
<tr><td valign="top"><a href="#get_queue_info-1">get_queue_info/1</a></td><td>Returns all queue info.</td></tr>
<tr><td valign="top"><a href="#get_queue_info-2">get_queue_info/2</a></td><td>Return the specified queue info.</td></tr>
<tr><td valign="top"><a href="#get_sampler_info-1">get_sampler_info/1</a></td><td>Returns all information about the sampler object.</td></tr>
<tr><td valign="top"><a href="#get_sampler_info-2">get_sampler_info/2</a></td><td>Returns <c>InfoType</c> information about the sampler object.</td></tr>
<tr><td valign="top"><a href="#get_supported_image_formats-3">get_supported_image_formats/3</a></td><td>return a list of image formats [{Order,Type}].</td></tr>
<tr><td valign="top"><a href="#image_info-0">image_info/0</a></td><td></td></tr>
<tr><td valign="top"><a href="#kernel_info-0">kernel_info/0</a></td><td></td></tr>
<tr><td valign="top"><a href="#kernel_workgroup_info-0">kernel_workgroup_info/0</a></td><td></td></tr>
<tr><td valign="top"><a href="#mem_object_info-0">mem_object_info/0</a></td><td>Returns a list of the possible mem info keys.</td></tr>
<tr><td valign="top"><a href="#noop-0">noop/0</a></td><td>Run a no operation towards the NIF object.</td></tr>
<tr><td valign="top"><a href="#nowait_enqueue_nd_range_kernel-5">nowait_enqueue_nd_range_kernel/5</a></td><td></td></tr>
<tr><td valign="top"><a href="#nowait_enqueue_task-3">nowait_enqueue_task/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#nowait_enqueue_write_buffer-6">nowait_enqueue_write_buffer/6</a></td><td></td></tr>
<tr><td valign="top"><a href="#nowait_enqueue_write_image-8">nowait_enqueue_write_image/8</a></td><td></td></tr>
<tr><td valign="top"><a href="#platform_info-0">platform_info/0</a></td><td>Returns a list of the possible platform info keys.</td></tr>
<tr><td valign="top"><a href="#program_build_info-0">program_build_info/0</a></td><td></td></tr>
<tr><td valign="top"><a href="#program_info-0">program_info/0</a></td><td></td></tr>
<tr><td valign="top"><a href="#queue_info-0">queue_info/0</a></td><td>Returns the list of possible queue info items.</td></tr>
<tr><td valign="top"><a href="#release_context-1">release_context/1</a></td><td>Decrement the context reference count.</td></tr>
<tr><td valign="top"><a href="#release_event-1">release_event/1</a></td><td>Decrements the event reference count.</td></tr>
<tr><td valign="top"><a href="#release_kernel-1">release_kernel/1</a></td><td> Decrements the kernel reference count.</td></tr>
<tr><td valign="top"><a href="#release_mem_object-1">release_mem_object/1</a></td><td> Decrements the memory object reference count.</td></tr>
<tr><td valign="top"><a href="#release_program-1">release_program/1</a></td><td>Decrements the program reference count.</td></tr>
<tr><td valign="top"><a href="#release_queue-1">release_queue/1</a></td><td>Decrements the command_queue reference count.</td></tr>
<tr><td valign="top"><a href="#release_sampler-1">release_sampler/1</a></td><td>Decrements the sampler reference count.</td></tr>
<tr><td valign="top"><a href="#retain_context-1">retain_context/1</a></td><td>Increment the context reference count.</td></tr>
<tr><td valign="top"><a href="#retain_event-1">retain_event/1</a></td><td> Increments the event reference count.</td></tr>
<tr><td valign="top"><a href="#retain_kernel-1">retain_kernel/1</a></td><td> Increments the program kernel reference count.</td></tr>
<tr><td valign="top"><a href="#retain_mem_object-1">retain_mem_object/1</a></td><td>Increments the memory object reference count.</td></tr>
<tr><td valign="top"><a href="#retain_program-1">retain_program/1</a></td><td> Increments the program reference count.</td></tr>
<tr><td valign="top"><a href="#retain_queue-1">retain_queue/1</a></td><td>Increments the command_queue reference count.</td></tr>
<tr><td valign="top"><a href="#retain_sampler-1">retain_sampler/1</a></td><td>Increments the sampler reference count.</td></tr>
<tr><td valign="top"><a href="#sampler_info-0">sampler_info/0</a></td><td></td></tr>
<tr><td valign="top"><a href="#set_kernel_arg-3">set_kernel_arg/3</a></td><td>Used to set the argument value for a specific argument of a kernel.</td></tr>
<tr><td valign="top"><a href="#set_kernel_arg_size-3">set_kernel_arg_size/3</a></td><td>clErlang special to set kernel arg with size only (local mem etc).</td></tr>
<tr><td valign="top"><a href="#set_queue_property-3">set_queue_property/3</a></td><td>Function is deprecated and have been removed.</td></tr>
<tr><td valign="top"><a href="#start-0">start/0</a></td><td>Start the OpenCL application.</td></tr>
<tr><td valign="top"><a href="#start-1">start/1</a></td><td>Start the OpenCL application.</td></tr>
<tr><td valign="top"><a href="#stop-0">stop/0</a></td><td>Stop the OpenCL application.</td></tr>
<tr><td valign="top"><a href="#unload_compiler-0">unload_compiler/0</a></td><td>Allows the implementation to release the resources allocated by the OpenCL compiler.</td></tr>
<tr><td valign="top"><a href="#unload_platform_compiler-1">unload_platform_compiler/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#versions-0">versions/0</a></td><td>Run a no operation towards the NIF object.</td></tr>
<tr><td valign="top"><a href="#wait-1">wait/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#wait-2">wait/2</a></td><td> Waits for commands identified by event objects to complete.</td></tr>
<tr><td valign="top"><a href="#wait_for_event-1">wait_for_event/1</a></td><td>Equivalent to <a href="#wait-2"><tt>wait(Event, infinity)</tt></a>.
</td></tr>
</table>
<h2><a name="functions">Function Details</a></h2>
<h3 class="function"><a name="async_build_program-3">async_build_program/3</a></h3>
<div class="spec">
<p><tt>async_build_program(Program, DeviceList, Options) -> any()</tt></p>
</div>
<h3 class="function"><a name="async_finish-1">async_finish/1</a></h3>
<div class="spec">
<p><tt>async_finish(Queue) -> any()</tt></p>
</div>
<h3 class="function"><a name="async_flush-1">async_flush/1</a></h3>
<div class="spec">
<p><tt>async_flush(Queue) -> any()</tt></p>
</div>
<h3 class="function"><a name="async_wait_for_event-1">async_wait_for_event/1</a></h3>
<div class="spec">
<p><tt>async_wait_for_event(Event::<a href="#type-cl_event">cl_event()</a>) -> {ok, reference()} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p> Initiate an asynchronous wait operation.</p>
Generate a wait operation that will run non blocking.
A reference is return that can be used to match the event
that is sent when the event has completed or resulted in an error.
The event returned has the form <code>{cl_event, Ref, Result}</code>
where Ref is the reference that was returned from the call and
Result may be one of binary() | 'complete' or {error,cl_error()}.
</p>
<h3 class="function"><a name="build_program-3">build_program/3</a></h3>
<div class="spec">
<p><tt>build_program(Program::<a href="#type-cl_program">cl_program()</a>, DeviceList::[<a href="#type-cl_device_id">cl_device_id()</a>], Options::string()) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Builds (compiles and links) a program executable from the
program source or binary.</p>
<p>OpenCL allows program executables to be built using the source or the binary.</p>
<p>The build options are categorized as pre-processor options, options
for math intrinsics, options that control optimization and
miscellaneous options. This specification defines a standard set of
options that must be supported by an OpenCL compiler when building
program executables online or offline. These may be extended by a
set of vendor- or platform-specific options.</p>
<h4>Preprocessor Options</h4><p> These options
control the OpenCL preprocessor which is run on each program source
before actual compilation. -D options are processed in the order
they are given in the options argument to
<code>build_program/3</code>.</p>
<dl>
<dt><span>-D name</span></dt><dd>
<p> Predefine <code>name</code> as a macro, with definition 1.</p></dd>
<dt>-D name=definition</dt><dd><p> The contents of <code>definition</code>
are tokenized and processed as if they appeared during translation phase three in a <code>#define</code>
directive. In particular, the definition will be truncated by
embedded newline characters. </p></dd>
<dt>-I dir</dt><dd> <p>Add the directory <code>dir</code> to the list of directories to be
searched for header files.</p> </dd></dl><p>
<br></p>
<h4>Math Intrinsics Options</h4> These options control compiler
behavior regarding floating-point arithmetic. These options trade
off between speed and correctness.
<dl><dt>-cl-single-precision-constant</dt><dd><p> Treat double
precision floating-point constant as single precision constant.
</p></dd><dt>-cl-denorms-are-zero</dt><dd><p> This option controls
how single precision and double precision denormalized numbers are
handled. If specified as a build option, the single precision
denormalized numbers may be flushed to zero and if the optional
extension for double precision is supported, double precision
denormalized numbers may also be flushed to zero. This is intended
to be a performance hint and the OpenCL compiler can choose not to
flush denorms to zero if the device supports single precision (or
double precision) denormalized numbers. </p><p> This option is
ignored for single precision numbers if the device does not support
single precision denormalized numbers i.e. CL_FP_DENORM bit is not
set in CL_DEVICE_SINGLE_FP_CONFIG. </p><p> </p><p> This option is
ignored for double precision numbers if the device does not support
double precision or if it does support double precison but
CL_FP_DENORM bit is not set in CL_DEVICE_DOUBLE_FP_CONFIG. </p><p>
This flag only applies for scalar and vector single precision
floating-point variables and computations on these floating-point
variables inside a program. It does not apply to reading from or
writing to image objects. </p><p> </p></dd></dl><p><br>
</p>
<h4>Optimization Options</h4> These options control various
sorts of optimizations. Turning on optimization flags makes the
compiler attempt to improve the performance and/or code size at the
expense of compilation time and possibly the ability to debug the
program. <dl><dt>-cl-opt-disable</dt><dd><p> This option
disables all optimizations. The default is optimizations are
enabled. </p></dd><dt>-cl-strict-aliasing</dt><dd><p> This option
allows the compiler to assume the strictest aliasing rules.
</p></dd></dl>
<p> The following options control compiler
behavior regarding floating-point arithmetic. These options trade
off between performance and correctness and must be specifically
enabled. These options are not turned on by default since it can
result in incorrect output for programs which depend on an exact
implementation of IEEE 754 rules/specifications for math functions.
</p><dl><dt>-cl-mad-enable</dt><dd><p> Allow <code>a * b + c</code>
to be replaced by a <code>mad</code>. The <code>mad</code> computes
<code>a * b + c</code> with reduced accuracy. For example, some
OpenCL devices implement <code>mad</code> as truncate
the result of <code>a * b</code> before adding it to
<code>c</code>. </p></dd>
<dt>-cl-no-signed-zeros</dt><dd>
<p> Allow optimizations for floating-point arithmetic that ignore
the signedness of zero. IEEE 754 arithmetic specifies the behavior
of distinct <code>+0.0</code> and <code>-0.0</code> values, which
then prohibits simplification of expressions such as
<code>x+0.0</code> or <code>0.0*x</code> (even with -clfinite-math
only). This option implies that the sign of a zero result isn't
significant. </p></dd>
<dt>-cl-unsafe-math-optimizations</dt><dd><p> Allow optimizations
for floating-point arithmetic that (a) assume that arguments and
results are valid, (b) may violate IEEE 754 standard and (c) may
violate the OpenCL numerical compliance requirements as defined in
section 7.4 for single-precision floating-point, section 9.3.9 for
double-precision floating-point, and edge case behavior in section
7.5. This option includes the -cl-no-signed-zeros and
-cl-mad-enable options. </p></dd>
<dt><span class="term">-cl-finite-math-only</span></dt><dd><p>
Allow optimizations for floating-point arithmetic that assume that arguments and results
are not NaNs or ±infinity. This option may violate the OpenCL numerical compliance
requirements defined in in section 7.4 for single-precision floating-point,
section 9.3.9 for double-precision floating-point, and edge case behavior in section 7.5.
</p></dd>
<dt><span class="term">-cl-fast-relaxed-math</span></dt><dd><p>
Sets the optimization options -cl-finite-math-only and -cl-unsafe-math-optimizations.
This allows optimizations for floating-point arithmetic that may violate the IEEE 754
standard and the OpenCL numerical compliance requirements defined in the specification in section 7.4 for single-precision floating-point, section 9.3.9 for double-precision floating-point,
and edge case behavior in section 7.5. This option causes the preprocessor macro
<code>__FAST_RELAXED_MATH__</code> to be defined in the OpenCL program.
</p></dd></dl><p><br>
</p><h4>Options to Request or Suppress Warnings</h4>
Warnings are diagnostic messages that report constructions which are not inherently erroneous
but which are risky or suggest there may have been an error. The following languageindependent
options do not enable specific warnings but control the kinds of diagnostics
produced by the OpenCL compiler.
<dl><dt><span class="term">-w</span></dt><dd><p>
Inhibit all warning messages.
</p></dd><dt><span class="term">-Werror</span></dt><dd><p>
Make all warnings into errors.
</p></dd>
</dl></p>
<h3 class="function"><a name="context_info-0">context_info/0</a></h3>
<div class="spec">
<p><tt>context_info() -> [<a href="#type-cl_context_info_key">cl_context_info_key()</a>]</tt><br></p>
</div><p>List context info queries.</p>
<h3 class="function"><a name="create_buffer-3">create_buffer/3</a></h3>
<div class="spec">
<p><tt>create_buffer(Context::<a href="#type-cl_context">cl_context()</a>, Flags::<a href="#type-cl_mem_flags">cl_mem_flags()</a>, Size::non_neg_integer()) -> {ok, <a href="#type-cl_mem">cl_mem()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Equivalent to <a href="#create_buffer-4"><tt>create_buffer(Context, Flags, Size, <<>>)</tt></a>.</p>
<h3 class="function"><a name="create_buffer-4">create_buffer/4</a></h3>
<div class="spec">
<p><tt>create_buffer(Context::<a href="#type-cl_context">cl_context()</a>, Flags::[<a href="#type-cl_mem_flag">cl_mem_flag()</a>], Size::non_neg_integer(), Data::binary()) -> {ok, <a href="#type-cl_mem">cl_mem()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p> Creates a buffer object.
</p>
<h3 class="function"><a name="create_context-1">create_context/1</a></h3>
<div class="spec">
<p><tt>create_context(DeviceList::[<a href="#type-cl_device_id">cl_device_id()</a>]) -> {ok, <a href="#type-cl_context">cl_context()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Creates an OpenCL context.</p>
<p>An OpenCL context is created with one or more devices. Contexts are
used by the OpenCL runtime for managing objects such as
command-queues, memory, program and kernel objects and for
executing kernels on one or more devices specified in the context.</p>
NOTE: create_context/1 and create_context_from_type/1 perform an
implicit retain. This is very helpful for 3rd party libraries,
which typically get a context passed to them by the
application. However, it is possible that the application may
delete the context without informing the library. Allowing
functions to attach to (i.e. retain) and release a context solves
the problem of a context being used by a library no longer being
valid.</p>
<h3 class="function"><a name="create_context_from_type-1">create_context_from_type/1</a></h3>
<div class="spec">
<p><tt>create_context_from_type(Type::<a href="#type-cl_device_types">cl_device_types()</a>) -> {ok, <a href="#type-cl_context">cl_context()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Create an OpenCL context from a device type that identifies the specific device(s) to use.</p>
<p>NOTE:
create_context_from_type/1 may return all or a subset of the
actual physical devices present in the platform and that match
device_type.</p>
create_context/1 and create_context_from_type/1 perform an
implicit retain. This is very helpful for 3rd party libraries,
which typically get a context passed to them by the
application. However, it is possible that the application may
delete the context without informing the library. Allowing
functions to attach to (i.e. retain) and release a context solves
the problem of a context being used by a library no longer being
valid.</p>
<h3 class="function"><a name="create_image-5">create_image/5</a></h3>
<div class="spec">
<p><tt>create_image(Context, MemFlags, ImageFormat, ImageDesc, Data) -> any()</tt></p>
</div>
<h3 class="function"><a name="create_image2d-7">create_image2d/7</a></h3>
<div class="spec">
<p><tt>create_image2d(Context, MemFlags, ImageFormat, Width, Height, Picth, Data) -> any()</tt></p>
</div>
<h3 class="function"><a name="create_image3d-9">create_image3d/9</a></h3>
<div class="spec">
<p><tt>create_image3d(Context, MemFlags, ImageFormat, Width, Height, Depth, RowPicth, SlicePitch, Data) -> any()</tt></p>
</div>
<h3 class="function"><a name="create_kernel-2">create_kernel/2</a></h3>
<div class="spec">
<p><tt>create_kernel(Program::<a href="#type-cl_program">cl_program()</a>, Name::string()) -> {ok, <a href="#type-cl_kernel">cl_kernel()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p> Creates a kernal object.</p>
A kernel is a function declared in a program. A kernel is
identified by the __kernel qualifier applied to any function in a
program. A kernel object encapsulates the specific __kernel
function declared in a program and the argument values to be used
when executing this __kernel function.</p>
<h3 class="function"><a name="create_kernels_in_program-1">create_kernels_in_program/1</a></h3>
<div class="spec">
<p><tt>create_kernels_in_program(Program::<a href="#type-cl_program">cl_program()</a>) -> {ok, [<a href="#type-cl_kernel">cl_kernel()</a>]} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Creates kernel objects for all kernel functions in a program object.</p>
Creates kernel objects for all kernel functions in program. Kernel
objects are not created for any __kernel functions in program that
do not have the same function definition across all devices for
which a program executable has been successfully built.</p>
<h3 class="function"><a name="create_program_with_binary-3">create_program_with_binary/3</a></h3>
<div class="spec">
<p><tt>create_program_with_binary(Context::<a href="#type-cl_context">cl_context()</a>, DeviceList::[<a href="#type-cl_device_id">cl_device_id()</a>], BinaryList::[binary()]) -> {ok, <a href="#type-cl_program">cl_program()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p> Creates a program object for a context, and loads specified binary data into the program object.</p>
<p>OpenCL allows applications to create a program object using the
program source or binary and build appropriate program
executables. This allows applications to determine whether they
want to use the pre-built offline binary or load and compile the
program source and use the executable compiled/linked online as the
program executable. This can be very useful as it allows
applications to load and build program executables online on its
first instance for appropriate OpenCL devices in the system. These
executables can now be queried and cached by the
application. Future instances of the application launching will no
longer need to compile and build the program executables. The
cached executables can be read and loaded by the application, which
can help significantly reduce the application initialization time.</p>
The binaries and device can be generated by calling:
<code>
{ok,P} = cl:create_program_with_source(Context,Source),
ok = cl:build_program(P, DeviceList, Options),
{ok,DeviceList} = cl:get_program_info(P, devices),
{ok,BinaryList} = cl:get_program_info(P, binaries).
</code>
</p>
<h3 class="function"><a name="create_program_with_source-2">create_program_with_source/2</a></h3>
<div class="spec">
<p><tt>create_program_with_source(Context::<a href="#type-cl_context">cl_context()</a>, Source::iodata()) -> {ok, <a href="#type-cl_program">cl_program()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Creates a program object for a context,
and loads the source code specified by the text strings in the
strings array into the program object.</p>
The devices associated with the program object are the devices associated with context.</p>
<h3 class="function"><a name="create_queue-3">create_queue/3</a></h3>
<div class="spec">
<p><tt>create_queue(Context::<a href="#type-cl_context">cl_context()</a>, Device::<a href="#type-cl_device_id">cl_device_id()</a>, Properties::[<a href="#type-cl_queue_property">cl_queue_property()</a>]) -> {ok, <a href="#type-cl_queue">cl_queue()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Create a command-queue on a specific device.</p>
<dl>
<dt>'out_of_order_exec_mode_enable'</dt> <dd> Determines
whether the commands queued in the command-queue are executed
in-order or out-of-order. If set, the commands in the command-queue
are executed out-of-order. Otherwise, commands are executed
in-order.</dd>
<dt>'profiling_enabled'</dt> <dd> Enable or disable profiling of
commands in the command-queue. If set, the profiling of commands is
enabled. Otherwise profiling of commands is disabled. See
clGetEventProfilingInfo for more information.
</dd>
</dl>
<p>The OpenCL functions that are submitted to a command-queue are
enqueued in the order the calls are made but can be configured to
execute in-order or out-of-order. The properties argument in
clCreateCommandQueue can be used to specify the execution order.</p>
<p>If the 'out_of_order_exec_mode_enable' property of a
command-queue is not set, the commands enqueued to a command-queue
execute in order. For example, if an application calls
clEnqueueNDRangeKernel to execute kernel A followed by a
clEnqueueNDRangeKernel to execute kernel B, the application can
assume that kernel A finishes first and then kernel B is
executed. If the memory objects output by kernel A are inputs to
kernel B then kernel B will see the correct data in memory objects
produced by execution of kernel A. If the
'out_of_order_exec_mode_enable' property of a commandqueue
is set, then there is no guarantee that kernel A will finish before
kernel B starts execution.</p>
<p>Applications can configure the commands enqueued to a command-queue
to execute out-of-order by setting the
'out_of_order_exec_mode_enable' property of the
command-queue. This can be specified when the command-queue is
created or can be changed dynamically using
clCreateCommandQueue. In out-of-order execution mode there is no
guarantee that the enqueued commands will finish execution in the
order they were queued. As there is no guarantee that kernels will
be executed in order, i.e. based on when the clEnqueueNDRangeKernel
calls are made within a command-queue, it is therefore possible
that an earlier clEnqueueNDRangeKernel call to execute kernel A
identified by event A may execute and/or finish later than a
clEnqueueNDRangeKernel call to execute kernel B which was called by
the application at a later point in time. To guarantee a specific
order of execution of kernels, a wait on a particular event (in
this case event A) can be used. The wait for event A can be
specified in the event_wait_list argument to clEnqueueNDRangeKernel
for kernel B.</p>
<p>In addition, a wait for events or a barrier command can be enqueued
to the command-queue. The wait for events command ensures that
previously enqueued commands identified by the list of events to
wait for have finished before the next batch of commands is
executed. The barrier command ensures that all previously enqueued
commands in a command-queue have finished execution before the next
batch of commands is executed.</p>
Similarly, commands to read, write, copy or map memory objects that
are enqueued after clEnqueueNDRangeKernel, clEnqueueTask or
clEnqueueNativeKernel commands are not guaranteed to wait for
kernels scheduled for execution to have completed (if the
'out_of_order_exec_mode_enable' property is set). To ensure
correct ordering of commands, the event object returned by
clEnqueueNDRangeKernel, clEnqueueTask or clEnqueueNativeKernel can
be used to enqueue a wait for event or a barrier command can be
enqueued that must complete before reads or writes to the memory
object(s) occur.</p>
<h3 class="function"><a name="create_sampler-4">create_sampler/4</a></h3>
<div class="spec">
<p><tt>create_sampler(Context::<a href="#type-cl_context">cl_context()</a>, Normalized::boolean(), AddressingMode::<a href="#type-cl_addressing_mode">cl_addressing_mode()</a>, FilterMode::<a href="#type-cl_filter_mode">cl_filter_mode()</a>) -> {ok, <a href="#type-cl_sampler">cl_sampler()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Creates a sampler object.</p>
A sampler object describes how to sample an image when the image
is read in the kernel. The built-in functions to read from an
image in a kernel take a sampler as an argument. The sampler
arguments to the image read function can be sampler objects
created using OpenCL functions and passed as argument values to
the kernel or can be samplers declared inside a kernel. In this
section we discuss how sampler objects are created using OpenCL
functions.</p>
<h3 class="function"><a name="device_info-0">device_info/0</a></h3>
<div class="spec">
<p><tt>device_info() -> [<a href="#type-cl_device_info_key">cl_device_info_key()</a>]</tt><br></p>
</div><p>Return a list of possible device info queries.</p>
<p><b>See also:</b> <a href="#get_device_info-2">get_device_info/2</a>.</p>
<h3 class="function"><a name="device_info_10-1">device_info_10/1</a></h3>
<div class="spec">
<p><tt>device_info_10(L) -> any()</tt></p>
</div>
<h3 class="function"><a name="device_info_11-1">device_info_11/1</a></h3>
<div class="spec">
<p><tt>device_info_11(L) -> any()</tt></p>
</div>
<h3 class="function"><a name="device_info_12-1">device_info_12/1</a></h3>
<div class="spec">
<p><tt>device_info_12(L) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_barrier-1">enqueue_barrier/1</a></h3>
<div class="spec">
<p><tt>enqueue_barrier(Queue::<a href="#type-cl_queue">cl_queue()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>A synchronization point that enqueues a barrier operation.</p>
enqueue_barrier/1 is a synchronization point that ensures that all
queued commands in command_queue have finished execution before
the next batch of commands can begin execution.</p>
<h3 class="function"><a name="enqueue_barrier_with_wait_list-2">enqueue_barrier_with_wait_list/2</a></h3>
<div class="spec">
<p><tt>enqueue_barrier_with_wait_list(Queue::<a href="#type-cl_queue">cl_queue()</a>, WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> {ok, <a href="#type-cl_event">cl_event()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div>
<h3 class="function"><a name="enqueue_copy_buffer_to_image-7">enqueue_copy_buffer_to_image/7</a></h3>
<div class="spec">
<p><tt>enqueue_copy_buffer_to_image(Queue, SrcBuffer, DstImage, SrcOffset, DstOrigin, Region, WaitList) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_copy_image-6">enqueue_copy_image/6</a></h3>
<div class="spec">
<p><tt>enqueue_copy_image(QUeue, SrcImage, DstImage, Origin, Region, WaitList) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_copy_image_to_buffer-7">enqueue_copy_image_to_buffer/7</a></h3>
<div class="spec">
<p><tt>enqueue_copy_image_to_buffer(Queue, SrcImage, DstBuffer, Origin, Region, DstOffset, WaitList) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_map_buffer-6">enqueue_map_buffer/6</a></h3>
<div class="spec">
<p><tt>enqueue_map_buffer(Queue, Buffer, MapFlags, Offset, Size, WaitList) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_map_image-6">enqueue_map_image/6</a></h3>
<div class="spec">
<p><tt>enqueue_map_image(Queue, Image, MapFlags, Origin, Region, WaitList) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_marker-1">enqueue_marker/1</a></h3>
<div class="spec">
<p><tt>enqueue_marker(Queue::<a href="#type-cl_queue">cl_queue()</a>) -> {ok, <a href="#type-cl_event">cl_event()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p> Enqueues a marker command.</p>
Enqueues a marker command to command_queue. The marker command
returns an event which can be used to queue a wait on this marker
event i.e. wait for all commands queued before the marker command
to complete.</p>
<h3 class="function"><a name="enqueue_marker_with_wait_list-2">enqueue_marker_with_wait_list/2</a></h3>
<div class="spec">
<p><tt>enqueue_marker_with_wait_list(Queue::<a href="#type-cl_queue">cl_queue()</a>, WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> {ok, <a href="#type-cl_event">cl_event()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div>
<h3 class="function"><a name="enqueue_nd_range_kernel-5">enqueue_nd_range_kernel/5</a></h3>
<div class="spec">
<p><tt>enqueue_nd_range_kernel(Queue::<a href="#type-cl_queue">cl_queue()</a>, Kernel::<a href="#type-cl_kernel">cl_kernel()</a>, Global::[non_neg_integer()], Local::[non_neg_integer()], WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> {ok, <a href="#type-cl_event">cl_event()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Enqueues a command to execute a kernel on a device.</p>
<p>Work-group instances are executed in parallel across multiple
compute units or concurrently on the same compute unit.</p>
Each work-item is uniquely identified by a global identifier. The
global ID, which can be read inside the kernel, is computed using
the value given by global_work_size and global_work_offset. In
OpenCL 1.0, the starting global ID is always (0, 0, ... 0). In
addition, a work-item is also identified within a work-group by a
unique local ID. The local ID, which can also be read by the
kernel, is computed using the value given by local_work_size. The
starting local ID is always (0, 0, ... 0).</p>
<h3 class="function"><a name="enqueue_nd_range_kernel-6">enqueue_nd_range_kernel/6</a></h3>
<div class="spec">
<p><tt>enqueue_nd_range_kernel(Queue, Kernel, Global, Local, WaitList, WantEvent) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_read_buffer-5">enqueue_read_buffer/5</a></h3>
<div class="spec">
<p><tt>enqueue_read_buffer(Queue::<a href="#type-cl_queue">cl_queue()</a>, Buffer::<a href="#type-cl_mem">cl_mem()</a>, Offset::non_neg_integer(), Size::non_neg_integer(), WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> {ok, <a href="#type-cl_event">cl_event()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Enqueue commands to read from a buffer object to host memory.</p>
<p>Calling <code>enqueue_read_buffer</code> to read a region of the
buffer object with the <code>Buffer</code> argument value set to
<code>host_ptr</code> + <code>offset</code>, where
<code>host_ptr</code> is a pointer to the memory region specified
when the buffer object being read is created with
<code>CL_MEM_USE_HOST_PTR</code>, must meet the following
requirements in order to avoid undefined behavior:</p>
<ul> <li>All commands that use this buffer object have finished
execution before the read command begins execution</li>
<li>The buffer object is not mapped</li>
<li>The buffer object is not used by any command-queue until the
read command has finished execution</li>
</ul></p>
<h3 class="function"><a name="enqueue_read_image-7">enqueue_read_image/7</a></h3>
<div class="spec">
<p><tt>enqueue_read_image(Queue, Image, Origin, Region, RowPitch, SlicePitch, WaitList) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_task-3">enqueue_task/3</a></h3>
<div class="spec">
<p><tt>enqueue_task(Queue::<a href="#type-cl_queue">cl_queue()</a>, Kernel::<a href="#type-cl_kernel">cl_kernel()</a>, WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> {ok, <a href="#type-cl_event">cl_event()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Enqueues a command to execute a kernel on a device.</p>
The kernel is executed using a single work-item.</p>
<p><b>See also:</b> <a href="#enqueue_nd_range_kernel-5">enqueue_nd_range_kernel/5</a>.</p>
<h3 class="function"><a name="enqueue_task-4">enqueue_task/4</a></h3>
<div class="spec">
<p><tt>enqueue_task(Queue, Kernel, WaitList, WantEvent) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_unmap_mem_object-3">enqueue_unmap_mem_object/3</a></h3>
<div class="spec">
<p><tt>enqueue_unmap_mem_object(Queue, Mem, WaitList) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_wait_for_events-2">enqueue_wait_for_events/2</a></h3>
<div class="spec">
<p><tt>enqueue_wait_for_events(Queue::<a href="#type-cl_queue">cl_queue()</a>, WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Enqueues a wait for a specific event or a list of events
to complete before any future commands queued in the command-queue are
executed.</p>
The context associated with events in WaitList and Queue must be the same.</p>
<h3 class="function"><a name="enqueue_write_buffer-6">enqueue_write_buffer/6</a></h3>
<div class="spec">
<p><tt>enqueue_write_buffer(Queue::<a href="#type-cl_queue">cl_queue()</a>, Buffer::<a href="#type-cl_mem">cl_mem()</a>, Offset::non_neg_integer(), Size::non_neg_integer(), Data::binary(), WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> {ok, <a href="#type-cl_event">cl_event()</a>} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Enqueue commands to write to a buffer object from host memory.</p>
<p>Calling <code>enqueue_write_buffer</code> to update the latest bits
in a region of the buffer object with the <code>Buffer</code>
argument value set to <code>host_ptr</code> + <code>offset</code>,
where <code>host_ptr</code> is a pointer to the memory region
specified when the buffer object being read is created with
<code>CL_MEM_USE_HOST_PTR</code>, must meet the following
requirements in order to avoid undefined behavior:</p>
<ul> <li>The host memory region given by <code>(host_ptr + offset, cb)</code>
contains the latest bits when the enqueued write command begins
execution. </li>
<li>The buffer object is not mapped</li>
<li>The buffer object is not used by any command-queue until the read
command has finished execution</li> </ul></p>
<h3 class="function"><a name="enqueue_write_buffer-7">enqueue_write_buffer/7</a></h3>
<div class="spec">
<p><tt>enqueue_write_buffer(Queue, Buffer, Offset, Size, Data, WaitList, WantEvent) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_write_image-8">enqueue_write_image/8</a></h3>
<div class="spec">
<p><tt>enqueue_write_image(Queue, Image, Origin, Region, RowPitch, SlicePitch, Data, WaitList) -> any()</tt></p>
</div>
<h3 class="function"><a name="enqueue_write_image-9">enqueue_write_image/9</a></h3>
<div class="spec">
<p><tt>enqueue_write_image(Queue, Image, Origin, Region, RowPitch, SlicePitch, Data, WaitList, WantEvent) -> any()</tt></p>
</div>
<h3 class="function"><a name="event_info-0">event_info/0</a></h3>
<div class="spec">
<p><tt>event_info() -> any()</tt></p>
</div><p>Returns all possible event_info items.</p>
<h3 class="function"><a name="finish-1">finish/1</a></h3>
<div class="spec">
<p><tt>finish(Queue::<a href="#type-cl_queue">cl_queue()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Blocks until all previously queued OpenCL commands
in a command-queue are issued to the associated device and have
completed.</p>
finish does not return until all queued commands in command_queue
have been processed and completed. clFinish is also a
synchronization point.</p>
<h3 class="function"><a name="flush-1">flush/1</a></h3>
<div class="spec">
<p><tt>flush(Queue::<a href="#type-cl_queue">cl_queue()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Issues all previously queued OpenCL commands
in a command-queue to the device associated with the command-queue.</p>
flush only guarantees that all queued commands to command_queue get
issued to the appropriate device. There is no guarantee that they
will be complete after clFlush returns.</p>
<h3 class="function"><a name="get_context_info-1">get_context_info/1</a></h3>
<div class="spec">
<p><tt>get_context_info(Context::<a href="#type-cl_context">cl_context()</a>) -> {ok, [<a href="#type-cl_context_info">cl_context_info()</a>]} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Get all context info.</p>
<p><b>See also:</b> <a href="#get_context_info-2">get_context_info/2</a>.</p>
<h3 class="function"><a name="get_context_info-2">get_context_info/2</a></h3>
<div class="spec">
<p><tt>get_context_info(Context::<a href="#type-cl_context">cl_context()</a>, Info::<a href="#type-cl_context_info_key">cl_context_info_key()</a>) -> {ok, term()} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p> Query information about a context.</p>
<dl> <dt>reference_count</dt> <dd> Return the context reference
count. The reference count returned should be considered
immediately stale. It is unsuitable for general use in
applications. This feature is provided for identifying memory
leaks. </dd>
<dt>devices</dt> <dd>Return the list of devices in context.</dd>
<dt>properties</dt> <dd>Return the context properties.</dd>
</dl></p>
<h3 class="function"><a name="get_device_ids-0">get_device_ids/0</a></h3>
<div class="spec">
<p><tt>get_device_ids() -> {ok, [<a href="#type-cl_device_id">cl_device_id()</a>]} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Equivalent to <a href="#get_devive_ids-2"><tt>get_devive_ids(0, all)</tt></a>.</p>
<h3 class="function"><a name="get_device_ids-2">get_device_ids/2</a></h3>
<div class="spec">
<p><tt>get_device_ids(Platform::<a href="#type-cl_platform_id">cl_platform_id()</a>, Type::<a href="#type-cl_device_types">cl_device_types()</a>) -> {ok, [<a href="#type-cl_device_id">cl_device_id()</a>]} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Obtain the list of devices available on a platform.
<dl> <dt>Platform</dt> <dd>
Refers to the platform ID returned by <c>get_platform_ids</c> or can be
NULL. If platform is NULL, the behavior is implementation-defined. </dd>
<dt>Type</dt> <dd>
A list that identifies the type of OpenCL device. The
device_type can be used to query specific OpenCL devices or all
OpenCL devices available. </dd>
</dl>
<p>get_device_ids/2 may return all or a subset of the actual
physical devices present in the platform and that match
device_type.</p>
The application can query specific capabilities of the OpenCL
device(s) returned by get_device_ids/2. This can be used by the
application to determine which device(s) to use.
</p>
<h3 class="function"><a name="get_device_info-1">get_device_info/1</a></h3>
<div class="spec">
<p><tt>get_device_info(Device) -> {ok, [<a href="#type-cl_device_info">cl_device_info()</a>]} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Get all device info.</p>
<p><b>See also:</b> <a href="#get_device_info-2">get_device_info/2</a>.</p>
<h3 class="function"><a name="get_device_info-2">get_device_info/2</a></h3>
<div class="spec">
<p><tt>get_device_info(DevID::<a href="#type-cl_device_id">cl_device_id()</a>, Info::<a href="#type-cl_device_info_key">cl_device_info_key()</a>) -> {ok, term()} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Get information about an OpenCL device.</p>
<dl> <dt>'type' </dt> <dd> <p>The OpenCL device type. Currently
supported values are one of or a combination of: CL_DEVICE_TYPE_CPU,
CL_DEVICE_TYPE_GPU, CL_DEVICE_TYPE_ACCELERATOR, or
CL_DEVICE_TYPE_DEFAULT.</p></dd>
<dt>'vendor_id'</dt> <dd> <p>A unique device vendor identifier. An
example of a unique device identifier could be the PCIe ID.</p> </dd>
<dt>'max_compute_units'</dt> <dd> <p>The number of parallel compute
cores on the OpenCL device. The minimum value is 1.</p> </dd>
<dt>'max_work_item_dimensions'</dt> <dd> <p>Maximum dimensions that
specify the global and local work-item IDs used by the data parallel
execution model. (@see enqueue_nd_range_kernel/5). The
minimum value is 3.</p></dd>
<dt>'max_work_group_size'</dt> <dd> <p>Maximum number of
work-items in a work-group executing a kernel using the data parallel
execution model. (@see enqueue_nd_range_kernel/5). The minimum value
is 1.</p> </dd>
<dt>'max_work_item_sizes'</dt> <dd> <p>Maximum number of work-items
that can be specified in each dimension of the work-group to enqueue_nd_range_kernel/5.</p>
<p>Returns <code class="varname">n</code> entries, where <code class="varname">n</code> is the value returned by the query for
CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS. The minimum value is (1, 1,
1).</p></dd>
<dt>'preferred_vector_width_TYPE'</dt> <dd> <p>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.</p> <p>If the <c>cl_khr_fp64</c> extension is
not supported, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE must return
0.</p></dd>
<dt>'max_clock_frequency'</dt> <dd> <p>Maximum configured clock
frequency of the device in MHz.</p>
</dd> <dt>'address_bits'</dt> <dd> The default compute device address
space size specified as an unsigned integer value in bits. Currently
supported values are 32 or 64 bits. </dd>
<dt>'max_read_image_args'</dt> <dd> <p>Max number of simultaneous
image objects that can be read by a kernel. The minimum value is 128
if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p></dd>
<dt>'max_write_image_args'</dt> <dd> <p>Max number of
simultaneous image objects that can be written to by a kernel. The
minimum value is 8 if CL_DEVICE_IMAGE_SUPPORT is CL_TRUE.</p> </dd>
<dt>'max_mem_alloc_size'</dt> <dd> <p>Max size of memory object
allocation in bytes. The minimum value is max (1/4th of
CL_DEVICE_GLOBAL_MEM_SIZE, 128*1024*1024)</p></dd>
<dt>'image2d_max_width'</dt> <dd> <p>Max width of 2D image in
pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is
CL_TRUE.</p> </dd>
<dt>'image2d_max_height'</dt> <dd> <p>Max height of 2D image in
pixels. The minimum value is 8192 if CL_DEVICE_IMAGE_SUPPORT is
CL_TRUE.</p> </dd>
<dt>'image3d_max_width'</dt> <dd> <p>Max width of 3D image in
pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is
CL_TRUE.</p> </dd>
<dt>'image3d_max_height'</dt> <dd> <p>Max height of 3D image in
pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is
CL_TRUE.</p> </dd>
<dt>'image3d_max_depth'</dt> <dd> <p>Max depth of 3D image in
pixels. The minimum value is 2048 if CL_DEVICE_IMAGE_SUPPORT is
CL_TRUE.</p> </dd>
<dt>'image_support'</dt> <dd> <p>Is CL_TRUE if images are supported by
the OpenCL device and CL_FALSE otherwise.</p> </dd>
<dt>'max_parameter_size'</dt> <dd> <p>Max size in bytes of the
arguments that can be passed to a kernel. The minimum value is
256.</p> </dd>
<dt>'max_samplers'</dt> <dd> <p>Maximum number of samplers that can be
used in a kernel. The minimum value is 16 if CL_DEVICE_IMAGE_SUPPORT
is CL_TRUE.</p> </dd>
<dt>'mem_base_addr_align'</dt> <dd> <p>Describes the alignment in bits
of the base address of any allocated memory object.</p> </dd>
<dt>'min_data_type_align_size'</dt> <dd> <p>The smallest alignment in
bytes which can be used for any data type.</p> </dd>
<dt>'single_fp_config'</dt> <dd> <p>Describes single precision
floating-point capability of the device. This is a bit-field that
describes one or more of the following values:</p> <p>CL_FP_DENORM -
denorms are supported</p> <p>CL_FP_INF_NAN - INF and quiet NaNs are
supported</p> <p>CL_FP_ROUND_TO_NEAREST - round to nearest even
rounding mode supported</p>
<p>CL_FP_ROUND_TO_ZERO - round to zero rounding mode supported</p>
<p>CL_FP_ROUND_TO_INF - round to +ve and -ve infinity rounding modes supported</p>
<p>CL_FP_FMA - IEEE754-2008 fused multiply-add is supported</p>
<p>The mandated minimum floating-point capability is CL_FP_ROUND_TO_NEAREST | CL_FP_INF_NAN.</p>
</dd>
<dt>'global_mem_cache_type'</dt> <dd> <p>Return type:
cl_device_mem_cache_type</p> <p>Type of global memory cache
supported. Valid values are: CL_NONE, CL_READ_ONLY_CACHE, and
CL_READ_WRITE_CACHE.</p> </dd>
<dt>'global_mem_cacheline_size'</dt> <dd>
<p>Size of global memory cache line in bytes.</p>
</dd>
<dt>'global_mem_cache_size'</dt> <dd>
<p>Size of global memory cache in bytes.</p>
</dd>
<dt>'global_mem_size'</dt> <dd>
<p>Size of global device memory in bytes.</p>
</dd>
<dt>'max_constant_buffer_size'</dt> <dd>
<p>Max size in bytes of a constant buffer allocation. The minimum value is 64 KB.</p></dd>
<dt>'max_constant_args'</dt> <dd> <p>Max number of arguments
declared with the <c>__constant</c> qualifier in a kernel. The minimum
value is 8.</p> </dd>
<dt>'local_mem_type'</dt> <dd> <p>Type of local memory
supported. This can be set to CL_LOCAL implying dedicated local memory
storage such as SRAM, or CL_GLOBAL.</p> </dd>
<dt>'local_mem_size'</dt> <dd> <p>Size of local memory arena in
bytes. The minimum value is 16 KB.</p></dd>
<dt>'error_correction_support'</dt> <dd> Is CL_TRUE if the device
implements error correction for the memories, caches, registers
etc. in the device. Is CL_FALSE if the device does not implement error
correction. This can be a requirement for certain clients of
OpenCL.</dd>
<dt>'profiling_timer_resolution'</dt> <dd> <p>Describes the resolution
of device timer. This is measured in nanoseconds.</p> </dd>
<dt>'endian_little'</dt> <dd> Is CL_TRUE if the OpenCL device is a
little endian device and CL_FALSE otherwise. </dd>
<dt>'available'</dt> <dd> Is CL_TRUE if the device is available and
CL_FALSE if the device is not available. </dd>
<dt>'compiler_available'</dt> <dd> Is CL_FALSE if the implementation
does not have a compiler available to compile the program source. Is
CL_TRUE if the compiler is available. This can be CL_FALSE for the
embededed platform profile only. </dd>
<dt>'execution_capabilities'</dt> <dd> <p>Return type:
cl_device_exec_capabilities</p> <p>Describes the execution
capabilities of the device. This is a bit-field that describes one or
more of the following values:</p> <p>CL_EXEC_KERNEL - The OpenCL
device can execute OpenCL kernels.</p> <p>CL_EXEC_NATIVE_KERNEL - The
OpenCL device can execute native kernels.</p> <p>The mandated minimum
capability is CL_EXEC_KERNEL.</p> </dd>
<dt>'queue_properties'</dt> <dd> <p>Describes the command-queue
properties supported by the device. This is a bit-field that
describes one or more of the following values:</p>
<p>'out_of_order_exec_mode_enable'</p>
<p>'profiling_enable'</p> <p>These properties are described in
the table for create_queue/3 . The mandated minimum capability is
'profiling_enable'.</p> </dd>
<dt>'name'</dt> <dd> <p>Device name string.</p> </dd>
<dt>'vendor'</dt> <dd><p>Vendor name string.</p></dd>
<dt>'driver_version'</dt> <dd><p>OpenCL software driver version string</p> </dd>
<dt>'profile'</dt> <dd> <p>OpenCL profile string. Returns the profile
name supported by the device (see note). The profile name returned can
be one of the following strings:</p>
<p>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).</p> <p>EMBEDDED_PROFILE - if
the device supports the OpenCL embedded
profile.</p></dd>
<dt>'version'</dt> <dd> <p>OpenCL version string.</p> </dd>
<dt>'extensions' </dt> <dd><p>Returns a space separated list of extension names (the extension
names themselves do not contain any spaces). </p></dd>
<dt>'platform' </dt> <dd> <p>The platform associated with this device.</p> </dd>
</dl>
<c>NOTE</c>: CL_DEVICE_PROFILE: 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
EMBEDDED_PROFILE. The compiler must be available for all devices
i.e. CL_DEVICE_COMPILER_AVAILABLE is CL_TRUE. If the platform
profile returned is EMBEDDED_PROFILE, then devices that are only
EMBEDDED_PROFILE are supported.</p>
<h3 class="function"><a name="get_event_info-1">get_event_info/1</a></h3>
<div class="spec">
<p><tt>get_event_info(Event) -> any()</tt></p>
</div><p>Returns all specific information about the event object.</p>
<h3 class="function"><a name="get_event_info-2">get_event_info/2</a></h3>
<div class="spec">
<p><tt>get_event_info(Event, Info) -> any()</tt></p>
</div><p>Returns specific information about the event object.</p>
<h3 class="function"><a name="get_image_info-1">get_image_info/1</a></h3>
<div class="spec">
<p><tt>get_image_info(Mem) -> any()</tt></p>
</div>
<h3 class="function"><a name="get_image_info-2">get_image_info/2</a></h3>
<div class="spec">
<p><tt>get_image_info(Mem, Info) -> any()</tt></p>
</div>
<h3 class="function"><a name="get_kernel_info-1">get_kernel_info/1</a></h3>
<div class="spec">
<p><tt>get_kernel_info(Kernel) -> any()</tt></p>
</div><p>Returns all information about the kernel object.</p>
<h3 class="function"><a name="get_kernel_info-2">get_kernel_info/2</a></h3>
<div class="spec">
<p><tt>get_kernel_info(Kernel, Info) -> any()</tt></p>
</div><p>Returns specific information about the kernel object.</p>
<h3 class="function"><a name="get_kernel_workgroup_info-2">get_kernel_workgroup_info/2</a></h3>
<div class="spec">
<p><tt>get_kernel_workgroup_info(Kernel, Device) -> any()</tt></p>
</div><p>Returns all information about the kernel object that may be
specific to a device.</p>
<h3 class="function"><a name="get_kernel_workgroup_info-3">get_kernel_workgroup_info/3</a></h3>
<div class="spec">
<p><tt>get_kernel_workgroup_info(Kernel, Device, Info) -> any()</tt></p>
</div><p>Returns specific information about the kernel object that may
be specific to a device.</p>
<h3 class="function"><a name="get_mem_object_info-1">get_mem_object_info/1</a></h3>
<div class="spec">
<p><tt>get_mem_object_info(Mem::<a href="#type-cl_mem">cl_mem()</a>) -> {ok, term()} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Used to get all information that is common to all memory objects
(buffer and image objects).</p>
<h3 class="function"><a name="get_mem_object_info-2">get_mem_object_info/2</a></h3>
<div class="spec">
<p><tt>get_mem_object_info(Mem::<a href="#type-cl_mem">cl_mem()</a>, InfoType::<a href="#type-cl_mem_info_key">cl_mem_info_key()</a>) -> {ok, term()} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Used to get <c>InfoType</c> information that is common to all memory objects
(buffer and image objects).</p>
<h3 class="function"><a name="get_platform_ids-0">get_platform_ids/0</a></h3>
<div class="spec">
<p><tt>get_platform_ids() -> {ok, [<a href="#type-cl_platform_id">cl_platform_id()</a>]} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Obtain the list of platforms available.</p>
<h3 class="function"><a name="get_platform_info-1">get_platform_info/1</a></h3>
<div class="spec">
<p><tt>get_platform_info(Platform::<a href="#type-cl_platform_id">cl_platform_id()</a>) -> {ok, [<a href="#type-cl_platform_info">cl_platform_info()</a>]} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Get all information about the OpenCL platform.</p>
<p><b>See also:</b> <a href="#get_platform_info-2">get_platform_info/2</a>.</p>
<h3 class="function"><a name="get_platform_info-2">get_platform_info/2</a></h3>
<div class="spec">
<p><tt>get_platform_info(Platform::<a href="#type-cl_platform_id">cl_platform_id()</a>, Info::<a href="#type-cl_platform_info_key">cl_platform_info_key()</a>) -> {ok, term()} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Get specific information about the OpenCL platform.
<dl>
<dt>name</dt> <dd>Platform name string.</dd>
<dt>vendor</dt> <dd>Platform vendor string.</dd>
<dt>profile</dt>
<dd><p> OpenCL profile string. Returns the profile name
supported by the implementation. The profile name returned
can be one of the following strings:</p>
<p>FULL_PROFILE - if the implementation supports the OpenCL
specification (functionality defined as part of the core
specification and does not require any extensions to be supported).</p>
EMBEDDED_PROFILE - if the implementation supports the OpenCL
embedded profile. The embedded profile is defined to be a subset for
each version of OpenCL.</dd>
<dt>version</dt>
<dd>OpenCL version string. Returns the OpenCL version supported by the implementation.</dd>
<dt>extensions</dt> <dd>Returns a space-separated list of extension
names (the extension names themselves do not contain any spaces)
supported by the platform. Extensions defined here must be
supported by all devices associated with this platform. </dd>
</dl></p>
<h3 class="function"><a name="get_program_build_info-2">get_program_build_info/2</a></h3>
<div class="spec">
<p><tt>get_program_build_info(Program, Device) -> any()</tt></p>
</div><p>Returns all build information for each device in the program object.</p>
<h3 class="function"><a name="get_program_build_info-3">get_program_build_info/3</a></h3>
<div class="spec">
<p><tt>get_program_build_info(Program, Device, Info) -> any()</tt></p>
</div><p>Returns specific build information for each device in the program object.</p>
<h3 class="function"><a name="get_program_info-1">get_program_info/1</a></h3>
<div class="spec">
<p><tt>get_program_info(Program) -> any()</tt></p>
</div><p> Returns all information about the program object.</p>
<h3 class="function"><a name="get_program_info-2">get_program_info/2</a></h3>
<div class="spec">
<p><tt>get_program_info(Program, Info) -> any()</tt></p>
</div><p> Returns specific information about the program object.</p>
<h3 class="function"><a name="get_queue_info-1">get_queue_info/1</a></h3>
<div class="spec">
<p><tt>get_queue_info(Queue) -> [<a href="#type-queue_info_keys">queue_info_keys()</a>]</tt><br></p>
</div><p>Returns all queue info.</p>
<h3 class="function"><a name="get_queue_info-2">get_queue_info/2</a></h3>
<div class="spec">
<p><tt>get_queue_info(Queue, Info) -> {ok, term()}</tt><br></p>
</div><p>Return the specified queue info</p>
<h3 class="function"><a name="get_sampler_info-1">get_sampler_info/1</a></h3>
<div class="spec">
<p><tt>get_sampler_info(Sampler::<a href="#type-cl_sampler">cl_sampler()</a>) -> {ok, term()} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Returns all information about the sampler object.</p>
<p><b>See also:</b> <a href="#get_sampler_info-2">get_sampler_info/2</a>.</p>
<h3 class="function"><a name="get_sampler_info-2">get_sampler_info/2</a></h3>
<div class="spec">
<p><tt>get_sampler_info(Sampler::<a href="#type-cl_sampler">cl_sampler()</a>, InfoType::<a href="#type-cl_sampler_info_type">cl_sampler_info_type()</a>) -> {ok, term()} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Returns <c>InfoType</c> information about the sampler object.</p>
<h3 class="function"><a name="get_supported_image_formats-3">get_supported_image_formats/3</a></h3>
<div class="spec">
<p><tt>get_supported_image_formats(Context, Flags, ImageType) -> any()</tt></p>
</div><p>return a list of image formats [{Order,Type}]</p>
<h3 class="function"><a name="image_info-0">image_info/0</a></h3>
<div class="spec">
<p><tt>image_info() -> any()</tt></p>
</div>
<h3 class="function"><a name="kernel_info-0">kernel_info/0</a></h3>
<div class="spec">
<p><tt>kernel_info() -> any()</tt></p>
</div>
<h3 class="function"><a name="kernel_workgroup_info-0">kernel_workgroup_info/0</a></h3>
<div class="spec">
<p><tt>kernel_workgroup_info() -> any()</tt></p>
</div>
<h3 class="function"><a name="mem_object_info-0">mem_object_info/0</a></h3>
<div class="spec">
<p><tt>mem_object_info() -> [<a href="#type-cl_mem_info_keys">cl_mem_info_keys()</a>]</tt><br></p>
</div><p>Returns a list of the possible mem info keys.</p>
<h3 class="function"><a name="noop-0">noop/0</a></h3>
<div class="spec">
<p><tt>noop() -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Run a no operation towards the NIF object. This call can be used
to messure the call overhead to the NIF objeect.
</p>
<h3 class="function"><a name="nowait_enqueue_nd_range_kernel-5">nowait_enqueue_nd_range_kernel/5</a></h3>
<div class="spec">
<p><tt>nowait_enqueue_nd_range_kernel(Queue::<a href="#type-cl_queue">cl_queue()</a>, Kernel::<a href="#type-cl_kernel">cl_kernel()</a>, Global::[non_neg_integer()], Local::[non_neg_integer()], WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div>
<h3 class="function"><a name="nowait_enqueue_task-3">nowait_enqueue_task/3</a></h3>
<div class="spec">
<p><tt>nowait_enqueue_task(Queue::<a href="#type-cl_queue">cl_queue()</a>, Kernel::<a href="#type-cl_kernel">cl_kernel()</a>, WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div>
<h3 class="function"><a name="nowait_enqueue_write_buffer-6">nowait_enqueue_write_buffer/6</a></h3>
<div class="spec">
<p><tt>nowait_enqueue_write_buffer(Queue::<a href="#type-cl_queue">cl_queue()</a>, Buffer::<a href="#type-cl_mem">cl_mem()</a>, Offset::non_neg_integer(), Size::non_neg_integer(), Data::binary(), WaitList::[<a href="#type-cl_event">cl_event()</a>]) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div>
<h3 class="function"><a name="nowait_enqueue_write_image-8">nowait_enqueue_write_image/8</a></h3>
<div class="spec">
<p><tt>nowait_enqueue_write_image(Queue, Image, Origin, Region, RowPitch, SlicePitch, Data, WaitList) -> any()</tt></p>
</div>
<h3 class="function"><a name="platform_info-0">platform_info/0</a></h3>
<div class="spec">
<p><tt>platform_info() -> [<a href="#type-cl_platform_info_keys">cl_platform_info_keys()</a>]</tt><br></p>
</div><p>Returns a list of the possible platform info keys.</p>
<h3 class="function"><a name="program_build_info-0">program_build_info/0</a></h3>
<div class="spec">
<p><tt>program_build_info() -> any()</tt></p>
</div>
<h3 class="function"><a name="program_info-0">program_info/0</a></h3>
<div class="spec">
<p><tt>program_info() -> any()</tt></p>
</div>
<h3 class="function"><a name="queue_info-0">queue_info/0</a></h3>
<div class="spec">
<p><tt>queue_info() -> [<a href="#type-queue_info_keys">queue_info_keys()</a>]</tt><br></p>
</div><p>Returns the list of possible queue info items.</p>
<h3 class="function"><a name="release_context-1">release_context/1</a></h3>
<div class="spec">
<p><tt>release_context(Context::<a href="#type-cl_context">cl_context()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Decrement the context reference count.</p>
After the context reference count becomes zero and all the objects
attached to context (such as memory objects, command-queues) are
released, the context is deleted.</p>
<h3 class="function"><a name="release_event-1">release_event/1</a></h3>
<div class="spec">
<p><tt>release_event(Event::<a href="#type-cl_event">cl_event()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Decrements the event reference count.</p>
Decrements the event reference count. The event object is deleted
once the reference count becomes zero, the specific command
identified by this event has completed (or terminated) and there
are no commands in the command-queues of a context that require a
wait for this event to complete.</p>
<h3 class="function"><a name="release_kernel-1">release_kernel/1</a></h3>
<div class="spec">
<p><tt>release_kernel(Context::<a href="#type-cl_kernel">cl_kernel()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p> Decrements the kernel reference count.</p>
<h3 class="function"><a name="release_mem_object-1">release_mem_object/1</a></h3>
<div class="spec">
<p><tt>release_mem_object(Mem::<a href="#type-cl_mem">cl_mem()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p> Decrements the memory object reference count.</p>
After the memobj reference count becomes zero and commands queued
for execution on a command-queue(s) that use memobj have finished,
the memory object is deleted.</p>
<h3 class="function"><a name="release_program-1">release_program/1</a></h3>
<div class="spec">
<p><tt>release_program(Program::<a href="#type-cl_program">cl_program()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Decrements the program reference count.</p>
The program object is deleted after all kernel objects associated
with program have been deleted and the program reference count
becomes zero.</p>
<h3 class="function"><a name="release_queue-1">release_queue/1</a></h3>
<div class="spec">
<p><tt>release_queue(Queue::<a href="#type-cl_queue">cl_queue()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Decrements the command_queue reference count.</p>
After the command_queue reference count becomes zero and all
commands queued to command_queue have finished (e.g., kernel
executions, memory object updates, etc.), the command-queue is
deleted.</p>
<h3 class="function"><a name="release_sampler-1">release_sampler/1</a></h3>
<div class="spec">
<p><tt>release_sampler(Sampler::<a href="#type-cl_sampler">cl_sampler()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Decrements the sampler reference count.</p>
The sampler object is deleted after the reference count becomes
zero and commands queued for execution on a command-queue(s) that
use sampler have finished.</p>
<h3 class="function"><a name="retain_context-1">retain_context/1</a></h3>
<div class="spec">
<p><tt>retain_context(Context::<a href="#type-cl_context">cl_context()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Increment the context reference count.</p>
<p><b>See also:</b> <a href="create_context.html">create_context</a>.</p>
<h3 class="function"><a name="retain_event-1">retain_event/1</a></h3>
<div class="spec">
<p><tt>retain_event(Event::<a href="#type-cl_event">cl_event()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p> Increments the event reference count.
NOTE: The OpenCL commands that return an event perform an implicit retain.</p>
<h3 class="function"><a name="retain_kernel-1">retain_kernel/1</a></h3>
<div class="spec">
<p><tt>retain_kernel(Context::<a href="#type-cl_kernel">cl_kernel()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p> Increments the program kernel reference count.</p>
<h3 class="function"><a name="retain_mem_object-1">retain_mem_object/1</a></h3>
<div class="spec">
<p><tt>retain_mem_object(Mem::<a href="#type-cl_mem">cl_mem()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Increments the memory object reference count.</p>
<h3 class="function"><a name="retain_program-1">retain_program/1</a></h3>
<div class="spec">
<p><tt>retain_program(Program::<a href="#type-cl_program">cl_program()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p> Increments the program reference count.</p>
<h3 class="function"><a name="retain_queue-1">retain_queue/1</a></h3>
<div class="spec">
<p><tt>retain_queue(Queue::<a href="#type-cl_queue">cl_queue()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Increments the command_queue reference count.</p>
create_queue/3 performs an implicit retain. This is very
helpful for 3rd party libraries, which typically get a
command-queue passed to them by the application. However, it is
possible that the application may delete the command-queue without
informing the library. Allowing functions to attach to
(i.e. retain) and release a command-queue solves the problem of a
command-queue being used by a library no longer being valid.</p>
<h3 class="function"><a name="retain_sampler-1">retain_sampler/1</a></h3>
<div class="spec">
<p><tt>retain_sampler(Sampler::<a href="#type-cl_sampler">cl_sampler()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Increments the sampler reference count.</p>
<h3 class="function"><a name="sampler_info-0">sampler_info/0</a></h3>
<div class="spec">
<p><tt>sampler_info() -> any()</tt></p>
</div>
<h3 class="function"><a name="set_kernel_arg-3">set_kernel_arg/3</a></h3>
<div class="spec">
<p><tt>set_kernel_arg(Kernel::<a href="#type-cl_kernel">cl_kernel()</a>, Index::non_neg_integer(), Argument::<a href="#type-cl_kernel_arg">cl_kernel_arg()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Used to set the argument value for a specific argument of a kernel.</p>
<p>For now set_kernel_arg handles integer and floats
to set any other type use <code><<Foo:Bar/native...>></code>
use the macros defined in cl.hrl to get it right (except for padding)</p>
<p>A kernel object does not update the reference count for objects
such as memory, sampler objects specified as argument values by
set_kernel_arg/3, Users may not rely on a kernel object to retain
objects specified as argument values to the kernel.</p>
Implementations shall not allow cl_kernel objects to hold reference
counts to cl_kernel arguments, because no mechanism is provided for
the user to tell the kernel to release that ownership right. If the
kernel holds ownership rights on kernel args, that would make it
impossible for the user to tell with certainty when he may safely
release user allocated resources associated with OpenCL objects
such as the cl_mem backing store used with CL_MEM_USE_HOST_PTR.</p>
<h3 class="function"><a name="set_kernel_arg_size-3">set_kernel_arg_size/3</a></h3>
<div class="spec">
<p><tt>set_kernel_arg_size(Kernel::<a href="#type-cl_kernel">cl_kernel()</a>, Index::non_neg_integer(), Size::non_neg_integer()) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>clErlang special to set kernel arg with size only (local mem etc)
</p>
<h3 class="function"><a name="set_queue_property-3">set_queue_property/3</a></h3>
<div class="spec">
<p><tt>set_queue_property(Queue::<a href="#type-cl_queue">cl_queue()</a>, Properties::[<a href="#type-cl_queue_property">cl_queue_property()</a>], Enable::bool()) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Function is deprecated and have been removed.</p>
<h3 class="function"><a name="start-0">start/0</a></h3>
<div class="spec">
<p><tt>start() -> ok | {error, term()}</tt><br></p>
</div><p>Equivalent to <a href="#start-1"><tt>start([])</tt></a>.</p>
<p>Start the OpenCL application
</p>
<h3 class="function"><a name="start-1">start/1</a></h3>
<div class="spec">
<p><tt>start(Args::[<a href="#type-start_arg">start_arg()</a>]) -> ok | {error, term()}</tt><br></p>
</div><p>Start the OpenCL application
</p>
<h3 class="function"><a name="stop-0">stop/0</a></h3>
<div class="spec">
<p><tt>stop() -> ok | {error, term()}</tt><br></p>
</div><p>Equivalent to <a href="application.html#stop-1"><tt>application:stop(cl)</tt></a>.</p>
<p>Stop the OpenCL application
</p>
<h3 class="function"><a name="unload_compiler-0">unload_compiler/0</a></h3>
<div class="spec">
<p><tt>unload_compiler() -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p><p>Allows the implementation to release the resources allocated by the OpenCL compiler.</p>
This is a hint from the application and does not guarantee that the
compiler will not be used in the future or that the compiler will
actually be unloaded by the implementation. Calls to build_program/3
after unload_compiler/0 will reload the compiler, if necessary, to
build the appropriate program executable.</p>
<h3 class="function"><a name="unload_platform_compiler-1">unload_platform_compiler/1</a></h3>
<div class="spec">
<p><tt>unload_platform_compiler(Platform::<a href="#type-cl_platform_id">cl_platform_id()</a>) -> ok | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div>
<h3 class="function"><a name="versions-0">versions/0</a></h3>
<div class="spec">
<p><tt>versions() -> [{Major::integer(), Minor::integer()}]</tt><br></p>
</div><p>Run a no operation towards the NIF object. This call can be used
to messure the call overhead to the NIF objeect.
</p>
<h3 class="function"><a name="wait-1">wait/1</a></h3>
<div class="spec">
<p><tt>wait(Event::cl_event) -> {ok, completed} | {ok, Binary} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div>
<h3 class="function"><a name="wait-2">wait/2</a></h3>
<div class="spec">
<p><tt>wait(Event::cl_event, Timeout::timeout()) -> {ok, completed} | {ok, Binary} | {error, <a href="#type-cl_error">cl_error()</a>} | {error, timeout}</tt><br></p>
</div><p><p> Waits for commands identified by event objects to complete.</p>
Waits for commands identified by event objects
in event_list to complete. A command is considered complete if its
execution status is CL_COMPLETE or a negative value.</p>
<h3 class="function"><a name="wait_for_event-1">wait_for_event/1</a></h3>
<div class="spec">
<p><tt>wait_for_event(Event::cl_event) -> {ok, completed} | {ok, Binary} | {error, <a href="#type-cl_error">cl_error()</a>}</tt><br></p>
</div><p>Equivalent to <a href="#wait-2"><tt>wait(Event, infinity)</tt></a>.</p>
<hr>
<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc, Dec 30 2015, 11:11:14.</i></p>
</body>
</html>
|