diff --git a/extra/cuda/memory/memory.factor b/extra/cuda/memory/memory.factor index 248682aecc..9e856ad69b 100644 --- a/extra/cuda/memory/memory.factor +++ b/extra/cuda/memory/memory.factor @@ -9,10 +9,13 @@ IN: cuda.memory : cuda-malloc ( n -- ptr ) [ CUdeviceptr ] dip '[ _ cuMemAlloc cuda-error ] keep - c:*int ; + c:*int ; inline + +: cuda-malloc-type ( n type -- ptr ) + heap-size * cuda-malloc ; inline : cuda-free ( ptr -- ) - cuMemFree cuda-error ; + cuMemFree cuda-error ; inline DESTRUCTOR: cuda-free diff --git a/extra/cuda/syntax/syntax.factor b/extra/cuda/syntax/syntax.factor index 70a052726f..4e15fa383e 100644 --- a/extra/cuda/syntax/syntax.factor +++ b/extra/cuda/syntax/syntax.factor @@ -14,10 +14,10 @@ SYNTAX: CUDA-FUNCTION: ";" scan-c-args drop define-cuda-word ; : 2<<< ( dim-block dim-grid -- function-launcher ) - 0 f function-launcher boa ; + 0 f function-launcher boa ; inline : 3<<< ( dim-block dim-grid shared-size -- function-launcher ) - f function-launcher boa ; + f function-launcher boa ; inline : 4<<< ( dim-block dim-grid shared-size stream -- function-launcher ) - function-launcher boa ; + function-launcher boa ; inline