]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/cuda/memory/memory.factor
factor: trim using lists
[factor.git] / extra / cuda / memory / memory.factor
index 2369851292af4dfb8a6492cc7cba06d21775740e..92cb9dec31ca452e815f13e06baaae1f6e8083f8 100644 (file)
@@ -1,9 +1,7 @@
 ! Copyright (C) 2010 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien alien.data alien.destructors assocs
-byte-arrays cuda cuda.ffi destructors fry io.encodings.string
-io.encodings.utf8 kernel locals math namespaces sequences
-strings ;
+USING: alien alien.c-types alien.data alien.destructors
+byte-arrays cuda cuda.ffi kernel math ;
 QUALIFIED-WITH: alien.c-types c
 IN: cuda.memory
 
@@ -44,7 +42,7 @@ DESTRUCTOR: cuda-free
     cuMemcpyDtoH cuda-error ; inline
 
 : host>device ( data -- ptr )
-    [ >c-ptr ] [ byte-length ] bi
+    binary-object
     [ nip cuda-malloc dup ] [ memcpy-host>device ] 2bi ; inline
 
 : device>host ( ptr len -- byte-array )