2010-04-18 19:33:18 -04:00
|
|
|
! Copyright (C) 2010 Doug Coleman.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
2010-04-19 01:46:03 -04:00
|
|
|
USING: alien.parser cuda cuda.utils io.backend kernel lexer
|
|
|
|
namespaces parser ;
|
2010-04-18 19:33:18 -04:00
|
|
|
IN: cuda.syntax
|
|
|
|
|
2010-04-19 01:46:03 -04:00
|
|
|
SYNTAX: CUDA-LIBRARY:
|
|
|
|
scan scan normalize-path
|
|
|
|
[ add-cuda-library ]
|
|
|
|
[ drop current-cuda-library set-global ] 2bi ;
|
2010-04-18 19:33:18 -04:00
|
|
|
|
|
|
|
SYNTAX: CUDA-FUNCTION:
|
2010-04-19 01:46:03 -04:00
|
|
|
scan [ create-in current-cuda-library get ] [ ] bi
|
|
|
|
";" scan-c-args drop define-cuda-word ;
|
2010-04-18 19:33:18 -04:00
|
|
|
|
|
|
|
: 3<<< ( dim-block dim-grid shared-size -- function-launcher )
|
|
|
|
f function-launcher boa ;
|
|
|
|
|
|
|
|
: 4<<< ( dim-block dim-grid shared-size stream -- function-launcher )
|
|
|
|
function-launcher boa ;
|