CLMSYNC(3) Standard Compute Layer (CL) Manual CLMSYNC(3)
NAME
clmsync - Synchronize memory between host and co-processor device
SYNOPSIS
#include <stdcl.h>
cl_event clmsync( CONTEXT* cp, unsigned int devnum, void* ptr, int
flags);
Link with -lstdcl.
DESCRIPTION
clmsync() is used to synchronize memory between the host and a compute
layer (CL) co-processor device. The memory pointed to by ptr must have
been created using a call to clmalloc() and associated with a CL con-
text.
The bahavior of clmsync() can be controlled using the following flags:
CL_EVENT_WAIT
clmsync() will block until the operation has completed.
CL_EVENT_NOWAIT
clmsync() 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 clmsync() 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 clmsync() will return (cl_event)(-1) and errno is set appro-
priately.
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
clwait(3), clwaitev(3), clmalloc(3), clfree(3), stdcl(3)
libstdcl-0.7 2009-11-10 CLMSYNC(3)