cuda: use arg names in stack effect.
parent
f80057d4b0
commit
6581741a92
|
@ -1,10 +1,10 @@
|
||||||
! Copyright (C) 2010 Doug Coleman.
|
! Copyright (C) 2010 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors alien.data alien.parser arrays assocs
|
USING: accessors alien.data alien.parser arrays assocs
|
||||||
byte-arrays classes.struct combinators combinators.short-circuit
|
byte-arrays classes.struct classes.struct.private combinators
|
||||||
cuda cuda.ffi fry generalizations io.backend kernel macros math
|
combinators.short-circuit cuda cuda.ffi fry generalizations
|
||||||
namespaces sequences variants words ;
|
io.backend kernel locals macros math namespaces sequences
|
||||||
FROM: classes.struct.private => compute-struct-offsets write-struct-slot ;
|
variants words ;
|
||||||
QUALIFIED-WITH: alien.c-types c
|
QUALIFIED-WITH: alien.c-types c
|
||||||
IN: cuda.libraries
|
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 ( module-name symbol-name -- device-ptr )
|
||||||
cuda-global* drop ; inline
|
cuda-global* drop ; inline
|
||||||
|
|
||||||
: define-cuda-function ( word module-name function-name arguments -- )
|
:: define-cuda-function ( word module-name function-name types names -- )
|
||||||
[ '[ _ _ _ cuda-invoke ] ]
|
word
|
||||||
[ 2nip \ grid suffix c:void function-effect ]
|
[ module-name function-name types cuda-invoke ]
|
||||||
3bi define-inline ;
|
names "grid" suffix c:void function-effect
|
||||||
|
define-inline ;
|
||||||
|
|
||||||
: define-cuda-global ( word module-name symbol-name -- )
|
: define-cuda-global ( word module-name symbol-name -- )
|
||||||
'[ _ _ cuda-global ] ( -- device-ptr ) define-inline ;
|
'[ _ _ cuda-global ] ( -- device-ptr ) define-inline ;
|
||||||
|
|
|
@ -11,7 +11,7 @@ SYNTAX: CUDA-LIBRARY:
|
||||||
|
|
||||||
SYNTAX: CUDA-FUNCTION:
|
SYNTAX: CUDA-FUNCTION:
|
||||||
scan-token [ create-word-in current-cuda-library get ] keep
|
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:
|
SYNTAX: CUDA-GLOBAL:
|
||||||
scan-token [ create-word-in current-cuda-library get ] keep
|
scan-token [ create-word-in current-cuda-library get ] keep
|
||||||
|
|
Loading…
Reference in New Issue