]> gitweb.factorcode.org Git - factor.git/commitdiff
Move cuda.devices word out of cuda.utils
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 23 Apr 2010 23:27:13 +0000 (18:27 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 23 Apr 2010 23:27:13 +0000 (18:27 -0500)
extra/cuda/devices/devices.factor
extra/cuda/utils/utils.factor

index 37e199e74e8d74d7c265c37175dec26443b51c3d..de36f702803a98a9e3b0b28984a9b6750e0e99dd 100644 (file)
@@ -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
index 7422836c84f9c388973aebadb88f2308cd83760f..eef205992f2ded4733e0d4d2f31df8316c77ca86 100644 (file)
@@ -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