Move cuda.devices word out of cuda.utils
parent
8323332838
commit
095763bcee
|
@ -1,8 +1,9 @@
|
|||
! Copyright (C) 2010 Doug Coleman.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: alien.c-types alien.data alien.strings arrays assocs
|
||||
byte-arrays classes.struct combinators cuda.ffi cuda.utils io
|
||||
io.encodings.utf8 kernel math.parser prettyprint sequences ;
|
||||
byte-arrays classes.struct combinators cuda cuda.ffi cuda.utils
|
||||
fry io io.encodings.utf8 kernel math.parser prettyprint
|
||||
sequences ;
|
||||
IN: cuda.devices
|
||||
|
||||
: #cuda-devices ( -- n )
|
||||
|
@ -14,6 +15,9 @@ IN: cuda.devices
|
|||
: enumerate-cuda-devices ( -- devices )
|
||||
#cuda-devices iota [ n>cuda-device ] map ;
|
||||
|
||||
: with-each-cuda-device ( quot -- )
|
||||
[ enumerate-cuda-devices ] dip '[ <launcher> _ with-cuda ] each ; inline
|
||||
|
||||
: cuda-device-properties ( device -- properties )
|
||||
[ CUdevprop <c-object> ] dip
|
||||
[ cuDeviceGetProperties cuda-error ] 2keep drop
|
||||
|
|
|
@ -92,6 +92,3 @@ ERROR: throw-cuda-error n ;
|
|||
: function-shared-size ( n -- )
|
||||
[ cuda-function get ] dip
|
||||
cuFuncSetSharedSize cuda-error ;
|
||||
|
||||
: with-each-cuda-device ( quot -- )
|
||||
[ enumerate-cuda-devices ] dip '[ <launcher> _ with-cuda ] each ; inline
|
||||
|
|
Loading…
Reference in New Issue