From 6d41ea32f58be873a74acd8e2b1cfa897865da24 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 7 May 2010 18:09:21 -0700 Subject: [PATCH] cuda.devices: have distribute-jobs construct a launcher with the calculated grid-dim, block-dim, and shared-size --- extra/cuda/devices/devices.factor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extra/cuda/devices/devices.factor b/extra/cuda/devices/devices.factor index 17e098c8df..d909e9ab5c 100644 --- a/extra/cuda/devices/devices.factor +++ b/extra/cuda/devices/devices.factor @@ -2,8 +2,8 @@ ! See http://factorcode.org/license.txt for BSD license. USING: accessors alien.c-types alien.data alien.strings arrays assocs byte-arrays classes.struct combinators cuda cuda.ffi -cuda.utils fry io io.encodings.utf8 kernel locals math -math.order math.parser namespaces prettyprint sequences ; +cuda.syntax cuda.utils fry io io.encodings.utf8 kernel locals +math math.order math.parser namespaces prettyprint sequences ; IN: cuda.devices : #cuda-devices ( -- n ) @@ -80,7 +80,7 @@ IN: cuda.devices grid-size block-size per-block-shared ; inline -: distribute-jobs ( job-count per-job-shared -- grid-size block-size per-block-shared ) +: distribute-jobs ( job-count per-job-shared -- launcher ) cuda-device get cuda-device-properties [ sharedMemPerBlock>> ] [ maxThreadsDim>> ] bi - (distribute-jobs) ; inline + (distribute-jobs) 3<<< ; inline