]> gitweb.factorcode.org Git - factor.git/commitdiff
cuda: in with-cuda-context, sync context when cleaning up so that destroying context...
authorJoe Groff <arcata@gmail.com>
Fri, 14 May 2010 22:17:26 +0000 (15:17 -0700)
committerJoe Groff <arcata@gmail.com>
Fri, 14 May 2010 23:00:27 +0000 (16:00 -0700)
extra/cuda/cuda.factor

index 667b3726c2b44f6109ec41c75a8fe57b3787e75f..3b472854b309c9ff04cbefdc84108cc754387b62 100644 (file)
@@ -26,7 +26,7 @@ dim-grid dim-block shared-size stream ;
     H{ } clone cuda-functions set
     [ create-context ] dip 
     [ '[ _ @ ] ]
-    [ drop '[ _ destroy-context ] ] 2bi
+    [ drop '[ [ sync-context ] ignore-errors _ destroy-context ] ] 2bi
     [ ] cleanup ; inline
 
 : with-cuda-program ( flags device quot -- )