 : unload-cuda-library ( name -- )
     remove-cuda-library handle>> unload-module ;
 
-: launch-function* ( function -- ) cuLaunch cuda-error ; inline
-
-: launch-function ( -- ) cuda-function get cuLaunch cuda-error ; inline
+: launch-function ( function -- ) cuLaunch cuda-error ; inline
 
 : run-grid ( grid function -- )
     swap
     {
-        [ dim-block>> block-dim function-block-shape* ]
-        [ shared-size>> function-shared-size* ]
+        [ dim-block>> block-dim function-block-shape ]
+        [ shared-size>> function-shared-size ]
         [
             dim-grid>>
-            [ grid-dim launch-function-grid* ]
-            [ launch-function* ] if*
+            [ grid-dim launch-function-grid ]
+            [ launch-function ] if*
         ]
     } 2cleave ;
 

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


: cached-function ( module-name function-name -- alien )
    [ cached-module ] dip
    2array cuda-functions get [ first2 get-function-ptr ] cache ;

MACRO: cuda-invoke ( module-name function-name arguments -- )
    '[
