39.7 Reusing Bridges (.NET, C#, CSharp, VB, Visual Basic, F#)
After customization, and especially after tuning (Section 39.6), it is desirable to save the Bridge object to disk, so it can be reused later. Again, this is done with the BridgeManager.
Code Example – C# GPU
BridgeManager.Instance.SaveBridge( bridge, @".\MyBridge" );
Code Example – VB GPU
BridgeManager.Instance.SaveBridge( Bridge, ".\MyBridge" )
NOTE—This overwrites any existing bridge with the same name.
Reloading that bridge from disk and assigning it to a device is simple.
Code Example – C# GPU
var myTunedBridge = BridgeManager.Instance.LoadBridge( @".\MyTunedBridge" ); BridgeManager.Instance.SetBridge( dev0, myTunedBridge );
Code Example – VB GPU
Dim MyTunedBridge As Bridge = BridgeManager.Instance.LoadBridge( ".\MyTunedBridge" ) BridgeManager.Instance.SetBridge( Dev0, MyTunedBridge )