Class ARMPrintf
This extension enables the device side printf built in function for OpenCL C versions prior to 1.2. It also extends the cl_context_properties
enumeration to allow a user defined printf
callback and/or printf
buffer size.
The printf
built in function should be used for debugging purposes only and may have a significant negative impact on the performance of an
OpenCL application.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Accepted by theproperties
argument toCreateContext
.static final int
Accepted by theproperties
argument toCreateContext
. -
Method Summary
-
Field Details
-
CL_PRINTF_CALLBACK_ARM
public static final int CL_PRINTF_CALLBACK_ARMAccepted by theproperties
argument toCreateContext
.Property value:
void printf_callback(const char *buffer, size_t len, size_t complete, void *user_data)
Specifies a pointer to function to be invoked when printf data is available. Upon invocation the arguments are set to the following values.
buffer
is a pointer to a character array of sizelen
created by printf.len
is the number of new characters inbuffer
.complete
is set to a non zero value if there is no more data in the device's printf buffer.user_data
is theuser_data
parameter specified toCreateContext
.
If this property is not specified, no callback will be registered and any printf output from a kernel will be discarded.
- See Also:
-
CL_PRINTF_BUFFERSIZE_ARM
public static final int CL_PRINTF_BUFFERSIZE_ARMAccepted by theproperties
argument toCreateContext
.Property value:
size_t
Specifies the size of printf buffer allocations to use within the driver. A printf buffer is allocated per device per context, within a context the buffer will be shared between kernels executing on a device. The implementation is free to round up or ignore this value.
If this property is not specified an implementation defined default size will be chosen. For OpenCL driver versions prior to OpenCL 1.2 this value will be 1 MiB. For driver versions of OpenCL 1.2 or greater this value is defined by the
DEVICE_PRINTF_BUFFER_SIZE
parameter name forGetDeviceInfo
.- See Also:
-