]> gitweb.factorcode.org Git - factor.git/commitdiff
cuda.devices: Utility word to print all cuda devices.
authorDoug Coleman <doug.coleman@gmail.com>
Sun, 4 Jun 2017 01:59:51 +0000 (20:59 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sun, 4 Jun 2017 01:59:51 +0000 (20:59 -0500)
extra/cuda/devices/devices.factor

index dc69946648dc5f9618d5b8d11a4aea88d1c8c3ea..5536dcd8977751d7a9687a4fe1cb2cc537b787fe 100644 (file)
@@ -61,6 +61,10 @@ IN: cuda.devices
         ]
     } cleave ;
 
+: cuda-devices. ( -- )
+    init-cuda
+    enumerate-cuda-devices [ cuda-device. ] each ;
+
 : cuda. ( -- )
     init-cuda
     "CUDA Version: " write cuda-version number>string print nl