I'm running clootils on Linux with the latest ati stream sdk. When opening the configuration dialog I see two devices (my cpu and my gpu) which is correct. When I select only the first or the first and the second device everything works ok, but when I select only my gpu (my second device), the Devices property contains a null entry. Attached is a patch to correct this problem!
BTW: Thanks for your work. Great project ...
--- cloopatch2/Clootils/ConfigForm.cs
+++ cloopatch/Clootils/ConfigForm.cs
@@ -1,4 +1,4 @@
-#region License
+#region License
/*
@@ -117,8 +117,14 @@
Platform = ComputePlatform.Platforms[ platformComboBox.SelectedIndex ];
Devices = new ComputeDevice[ deviceCheckList.CheckedItems.Count ];
- for( int i = 0; i < Devices.Length; i++ )
- if( deviceCheckList.GetItemChecked( i ) ) Devices[ i ] = Platform.Devices[ i ];
+
+ int k = 0;
+ for( int i = 0; k < Devices.Length && i < Platform.Devices.Count ; i++ ){
+ if( deviceCheckList.GetItemChecked( i ) ){
+ Devices[ k++ ] = Platform.Devices[ i ];
+ }
+ }
+
Options = optionsTextBox.Text;
}
}
Thanks!
I was unaware of this problem because I don't have a multidevice platform.