printf_Function - The OpenCL C programming language implements the printf function.
Contents
Copyright
Copyright © 2007-2011 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.
Description
The printf built-in function writes output to an implementation-defined stream such as stdout under
control of the string pointed to by format that specifies how subsequent arguments are converted for
output. If there are insufficient arguments for the format, the behavior is undefined. If the format is
exhausted while arguments remain, the excess arguments are evaluated (as always) but are otherwise
ignored. The printf function returns when the end of the format string is encountered.
Name
printf_Function - The OpenCL C programming language implements the printf function.
intprintf(constantchar*restrictformat,...);Notes
1. OpenCL Specification
page 284, section 6.12.13 - printf
The Khronos Group 11/18/2024 PRINTFFUNCTION(3clc)
Specification
OpenCLSpecification[1]
