]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/cuda/memory/memory.factor
Move <ref>, deref and little-endian? from alien.c-types to alien.data, remove <c...
[factor.git] / extra / cuda / memory / memory.factor
index 41a1cac7ff60dfea40ca7c9700781ba184f4d208..2369851292af4dfb8a6492cc7cba06d21775740e 100644 (file)
@@ -8,9 +8,8 @@ QUALIFIED-WITH: alien.c-types c
 IN: cuda.memory
 
 : cuda-malloc ( n -- ptr )
-    [ CUdeviceptr <c-object> ] dip
-    '[ _ cuMemAlloc cuda-error ] keep
-    c:int c:deref ; inline
+    [ { CUdeviceptr } ] dip
+    '[ _ cuMemAlloc cuda-error ] with-out-parameters ; inline
 
 : cuda-malloc-type ( n type -- ptr )
     c:heap-size * cuda-malloc ; inline