cuda: use arg names in stack effect.
parent
f80057d4b0
commit
6581741a92
|
@ -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 ;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue