diff --git a/extra/cuda/libraries/libraries.factor b/extra/cuda/libraries/libraries.factor index f899d4430d..21eef3d46e 100644 --- a/extra/cuda/libraries/libraries.factor +++ b/extra/cuda/libraries/libraries.factor @@ -1,10 +1,10 @@ ! Copyright (C) 2010 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien.data alien.parser arrays assocs -byte-arrays classes.struct combinators combinators.short-circuit -cuda cuda.ffi fry generalizations io.backend kernel macros math -namespaces sequences variants words ; -FROM: classes.struct.private => compute-struct-offsets write-struct-slot ; +byte-arrays classes.struct classes.struct.private combinators +combinators.short-circuit cuda cuda.ffi fry generalizations +io.backend kernel locals macros math namespaces sequences +variants words ; QUALIFIED-WITH: alien.c-types c IN: cuda.libraries @@ -177,10 +177,11 @@ MACRO: cuda-invoke ( module-name function-name arguments -- quot ) : cuda-global ( module-name symbol-name -- device-ptr ) cuda-global* drop ; inline -: define-cuda-function ( word module-name function-name arguments -- ) - [ '[ _ _ _ cuda-invoke ] ] - [ 2nip \ grid suffix c:void function-effect ] - 3bi define-inline ; +:: define-cuda-function ( word module-name function-name types names -- ) + word + [ module-name function-name types cuda-invoke ] + names "grid" suffix c:void function-effect + define-inline ; : define-cuda-global ( word module-name symbol-name -- ) '[ _ _ cuda-global ] ( -- device-ptr ) define-inline ; diff --git a/extra/cuda/syntax/syntax.factor b/extra/cuda/syntax/syntax.factor index 3b1cad591f..baf7b18ec8 100644 --- a/extra/cuda/syntax/syntax.factor +++ b/extra/cuda/syntax/syntax.factor @@ -11,7 +11,7 @@ SYNTAX: CUDA-LIBRARY: SYNTAX: CUDA-FUNCTION: scan-token [ create-word-in current-cuda-library get ] keep - scan-c-args drop define-cuda-function ; + scan-c-args define-cuda-function ; SYNTAX: CUDA-GLOBAL: scan-token [ create-word-in current-cuda-library get ] keep