 
 : cached-function ( module-name function-name -- alien )
     [ cached-module ] dip
-    2array cuda-functions get [ first2 get-function-ptr* ] cache ;
+    2array cuda-functions get [ first2 get-function-ptr ] cache ;
 
 MACRO: cuda-invoke ( module-name function-name arguments -- )
     '[

math namespaces sequences words ;
QUALIFIED-WITH: alien.c-types c
IN: cuda.libraries

SYMBOL: cuda-module
SYMBOL: cuda-function

SYMBOL: cuda-modules
SYMBOL: cuda-functions

: ?delete-at ( key assoc -- old/key ? )
    2dup delete-at* [ 2nip t ] [ 2drop f ] if ; inline

: cuda-int ( function offset value -- )
    cuParamSeti cuda-error ; inline

: cuda-float ( function offset value -- )
    cuParamSetf cuda-error ; inline

: cuda-vector ( function offset ptr n -- )
    cuParamSetv cuda-error ; inline

: param-size ( function n -- )
    cuParamSetSize cuda-error ; inline

: launch-function-grid ( function width height -- )
    cuLaunchGrid cuda-error ; inline

: function-block-shape ( function x y z -- )
    cuFuncSetBlockShape cuda-error ; inline

: function-shared-size ( function n -- )
    cuFuncSetSharedSize cuda-error ; inline

TUPLE: grid
