opencl: Make it compile at least. Throws error -38 on my linux box.
parent
bea4724cc8
commit
7aef52fd62
|
@ -1,8 +1,8 @@
|
|||
! Copyright (C) 2010 Erik Charlebois.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: tools.test opencl.ffi multiline locals kernel io.encodings.ascii
|
||||
io.encodings.string sequences libc alien.c-types destructors math specialized-arrays
|
||||
math.order alien ;
|
||||
io.encodings.string sequences libc alien.c-types destructors math
|
||||
specialized-arrays alien.data math.order alien ;
|
||||
FROM: alien.c-types => float ;
|
||||
SPECIALIZED-ARRAYS: float void* ;
|
||||
IN: opencl.ffi.tests
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: multiline locals io.encodings.ascii io.encodings.string sequences
|
||||
math specialized-arrays alien.c-types math.order alien opencl tools.test
|
||||
accessors arrays destructors kernel namespaces ;
|
||||
accessors arrays destructors kernel namespaces alien.data ;
|
||||
FROM: alien.c-types => float ;
|
||||
SPECIALIZED-ARRAY: float
|
||||
IN: opencl.tests
|
||||
|
@ -31,13 +31,14 @@ __kernel void square(
|
|||
"" kernel-source 1array <cl-program> &dispose "square" <cl-kernel> &dispose :> kernel
|
||||
cl-read-access num-bytes in <cl-buffer> &dispose :> in-buffer
|
||||
cl-write-access num-bytes f <cl-buffer> &dispose :> out-buffer
|
||||
|
||||
|
||||
kernel in-buffer out-buffer num-floats uint <ref> 3array
|
||||
{ num-floats } [ ] cl-queue-kernel &dispose drop
|
||||
|
||||
cl-finish
|
||||
|
||||
out-buffer 0 num-bytes <cl-buffer-range>
|
||||
cl-read-buffer num-floats flloat <c-direct-array>
|
||||
cl-read-buffer num-floats \ float <c-direct-array>
|
||||
] with-cl-state
|
||||
] with-destructors ;
|
||||
|
||||
|
|
|
@ -424,7 +424,7 @@ PRIVATE>
|
|||
[ cl-current-device ,, ] when*
|
||||
[ cl-current-context ,, ] when*
|
||||
] 3curry H{ } make
|
||||
] dip with-variable ; inline
|
||||
] dip with-variables ; inline
|
||||
|
||||
: cl-platforms ( -- platforms )
|
||||
0 f 0 uint <ref> [ clGetPlatformIDs cl-success ] keep uint deref
|
||||
|
|
Loading…
Reference in New Issue