factor/extra/cuda/syntax/syntax.factor

19 lines
556 B
Factor
Raw Normal View History

! Copyright (C) 2010 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.parser cuda.libraries fry kernel lexer namespaces
parser ;
IN: cuda.syntax
2017-08-26 15:20:04 -04:00
SYNTAX: \CUDA-LIBRARY:
scan-token scan-word scan-object
'[ _ _ add-cuda-library ]
[ current-cuda-library set-global ] bi ;
2017-08-26 15:20:04 -04:00
SYNTAX: \CUDA-FUNCTION:
scan-token [ create-word-in current-cuda-library get ] keep
2016-04-06 16:11:32 -04:00
scan-c-args define-cuda-function ;
2017-08-26 15:20:04 -04:00
SYNTAX: \CUDA-GLOBAL:
scan-token [ create-word-in current-cuda-library get ] keep
define-cuda-global ;