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.
|
! Copyright (C) 2010 Erik Charlebois.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: tools.test opencl.ffi multiline locals kernel io.encodings.ascii
|
USING: tools.test opencl.ffi multiline locals kernel io.encodings.ascii
|
||||||
io.encodings.string sequences libc alien.c-types destructors math specialized-arrays
|
io.encodings.string sequences libc alien.c-types destructors math
|
||||||
math.order alien ;
|
specialized-arrays alien.data math.order alien ;
|
||||||
FROM: alien.c-types => float ;
|
FROM: alien.c-types => float ;
|
||||||
SPECIALIZED-ARRAYS: float void* ;
|
SPECIALIZED-ARRAYS: float void* ;
|
||||||
IN: opencl.ffi.tests
|
IN: opencl.ffi.tests
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: multiline locals io.encodings.ascii io.encodings.string sequences
|
USING: multiline locals io.encodings.ascii io.encodings.string sequences
|
||||||
math specialized-arrays alien.c-types math.order alien opencl tools.test
|
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 ;
|
FROM: alien.c-types => float ;
|
||||||
SPECIALIZED-ARRAY: float
|
SPECIALIZED-ARRAY: float
|
||||||
IN: opencl.tests
|
IN: opencl.tests
|
||||||
|
@ -36,8 +36,9 @@ __kernel void square(
|
||||||
{ num-floats } [ ] cl-queue-kernel &dispose drop
|
{ num-floats } [ ] cl-queue-kernel &dispose drop
|
||||||
|
|
||||||
cl-finish
|
cl-finish
|
||||||
|
|
||||||
out-buffer 0 num-bytes <cl-buffer-range>
|
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-cl-state
|
||||||
] with-destructors ;
|
] with-destructors ;
|
||||||
|
|
||||||
|
|
|
@ -424,7 +424,7 @@ PRIVATE>
|
||||||
[ cl-current-device ,, ] when*
|
[ cl-current-device ,, ] when*
|
||||||
[ cl-current-context ,, ] when*
|
[ cl-current-context ,, ] when*
|
||||||
] 3curry H{ } make
|
] 3curry H{ } make
|
||||||
] dip with-variable ; inline
|
] dip with-variables ; inline
|
||||||
|
|
||||||
: cl-platforms ( -- platforms )
|
: cl-platforms ( -- platforms )
|
||||||
0 f 0 uint <ref> [ clGetPlatformIDs cl-success ] keep uint deref
|
0 f 0 uint <ref> [ clGetPlatformIDs cl-success ] keep uint deref
|
||||||
|
|
Loading…
Reference in New Issue