Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#5 Configuration dialog device selection

v1.0_(example)
closed-accepted
nobody
5
2010-04-01
2010-04-01
Anonymous
No

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;
}
}

Discussion

  • nythrix
    nythrix
    2010-04-01

    Thanks!
    I was unaware of this problem because I don't have a multidevice platform.

     
  • nythrix
    nythrix
    2010-04-01

    • status: open --> closed-accepted