Handbook
Glossary
cl-read-buffer ( buffer-range -- byte-array )
OpenCL
Prev:
cl-queue-copy-buffer ( src-buffer-ptr dst-buffer-ptr size dependent-events -- event )
Next:
cl-queue-read-buffer ( buffer-range alien dependent-events -- event )
Vocabulary
opencl
Inputs
buffer-range
a
cl-buffer-range
Outputs
byte-array
a
byte-array
Word description
Synchronously read a byte-array from the specified buffer location.
Definition
USING:
accessors
byte-arrays
kernel
opencl.ffi
opencl.private
;
IN:
opencl
:
cl-read-buffer
( buffer-range -- byte-array )
[
(current-cl-queue)
handle>>
]
dip
[
buffer>>
handle>>
CL_TRUE
]
[
offset>>
]
[
size>>
dup
<byte-array>
]
tri
[
0
f
f
clEnqueueReadBuffer
cl-success
]
keep
;
inline