CLFORK(3) Standard Compute Layer (CL) Manual CLFORK(3)
NAME
clfork - Execute a CL kernel
SYNOPSIS
#include <stdcl.h>
cl_event clfork( CONTEXT* cp, unsigned int devnum, cl_kernel krn,
clndrange_t* ndr, int flags);
Link with -lstdcl.
DESCRIPTION
clfork() is used to execute a CL kernel on a specified compute layer
(CL) co-processor device. The arguments for the kernel must be set
prior to the call to clfork() using the clarg_set*() functions. The
kernel is executed over an index-space of work-items defined by ndr.
The bahavior of clfork() can be controlled using the following flags:
CL_EVENT_WAIT
clfork() will block until the operation has completed.
CL_EVENT_NOWAIT
clfork() will return immediately. The programmer must ensure
that the operation has completed using clwait() or clwaitev().
CL_EVENT_RELEASE
Used with CL_EVENT_WAIT to force clfork() to release the CL
event generated by the operation. If this flag is not used the
programmer is responsible for releasing the returned event using
clReleaseEvent(). This flag has no effect when CL_EVENT_NOWAIT
is used.
RETURN VALUE
On error clfork() will return (cl_event)(-1) and errno is set appropri-
ately.
AUTHOR
Written by David Richie.
REPORTING BUGS
Report bugs to <support@browndeertechnology.com>
COPYRIGHT
Copyright (C) 2009 Brown Deer Technology, LLC. Licensed under the GNU
Lesser General Public License version 3 (LGPLv3). There is NO WARRANTY
to the extent permitted by law.
SEE ALSO
clarg_set(3), clndrange_init(3), clndrange_set(3), clwait(3),
clwaitev(3) stdcl(3)
libstdcl-0.7 2009-11-10 CLFORK(3)