'\" t .\" Title: clFlush .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 02/03/2019 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "CLFLUSH" "3clc" "02/03/2019" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" clFlush \- Issues all previously queued OpenCL commands in a command\-queue to the device associated with the command\-queue\&. .SH "" .HP \w'cl_int\ clFlush('u .BI "cl_int clFlush(cl_command_queue\ " "command_queue" ");" .SH "NOTES" .PP Issues all previously queued OpenCL commands in \fIcommand_queue\fR to the device associated with \fIcommand_queue\fR\&. .PP \fBclFlush\fR only guarantees that all queued commands to \fIcommand_queue\fR will eventually be submitted to the appropriate device There is no guarantee that they will be complete after \fBclFlush\fR returns\&. .PP Any blocking commands queued in a command\-queue and \fBclReleaseCommandQueue\fR(3clc) perform an implicit flush of the command\-queue\&. These blocking commands are \fBclEnqueueReadBuffer\fR(3clc), \fBclEnqueueReadBufferRect\fR(3clc), or \fBclEnqueueReadImage\fR(3clc) with \fIblocking_read\fR set to \fBCL_TRUE\fR; \fBclEnqueueWriteBuffer\fR(3clc), \fBclEnqueueWriteBufferRect\fR(3clc), or \fBclEnqueueWriteImage\fR(3clc) with \fIblocking_write\fR set to \fBCL_TRUE\fR; \fBclEnqueueMapBuffer\fR(3clc) or \fBclEnqueueMapImage\fR(3clc) with \fIblocking_map\fR set to \fBCL_TRUE\fR; or \fBclWaitForEvents\fR(3clc)\&. .PP To use event objects that refer to commands enqueued in a command\-queue as event objects to wait on by commands enqueued in a different command\-queue, the application must call a \fBclFlush\fR or any blocking commands that perform an implicit flush of the command\-queue where the commands that refer to these event objects are enqueued\&. .SH "ERRORS" .PP Returns CL_SUCCESS if the function call was executed successfully\&. Otherwise, it returns one of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_COMMAND_QUEUE if \fIcommand_queue\fR is not a valid command\-queue\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device\&. .RE .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBclFinish\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br 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. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 193, section 5.13 - Flush and Finish .RE