Changeset 2150


Ignore:
Timestamp:
Dec 1, 2010, 9:20:22 PM (11 years ago)
Author:
Sven Rech
Message:

some additional keysearcher fixes

Location:
trunk/CrypPlugins/KeySearcher
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/KeySearcher/KeySearcher.cs

    r2149 r2150  
    382382            {
    383383                keySearcherOpenCLCode = new KeySearcherOpenCLCode(this, encryptedData, sender, CostMaster, 256 * 256 * 256 * 16);
    384                 keySearcherOpenCLSubbatchOptimizer = new KeySearcherOpenCLSubbatchOptimizer(oclManager.CQ[settings.OpenCLDevice].Device.MaxWorkItemSizes.Aggregate(1, (x, y) => (x * (int)y)) / 2);
     384                keySearcherOpenCLSubbatchOptimizer = new KeySearcherOpenCLSubbatchOptimizer(oclManager.CQ[settings.OpenCLDevice].Device.MaxWorkItemSizes.Aggregate(1, (x, y) => (x * (int)y)) / 8);
    385385                ((QuickWatch)QuickWatchPresentation).Dispatcher.BeginInvoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    386386                {
     
    836836                else
    837837                {
    838                     showProgress(costList, size, keycounter, keysPerSecond, openCLKeysPerSecond, (double)openCLdoneKeys / (double)doneKeys);
    839                 }
     838                    showProgress(costList, size, keycounter, keysPerSecond);
     839                }
     840
     841                //show OpenCL keys/sec:
     842                ((QuickWatch)QuickWatchPresentation).Dispatcher.BeginInvoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
     843                {
     844                    ((QuickWatch)QuickWatchPresentation).OpenCLPresentation.keysPerSecond.Content = String.Format("{0:N}", openCLKeysPerSecond);
     845                    ((QuickWatch)QuickWatchPresentation).OpenCLPresentation.ratio.Content = String.Format("{0:P}", (double)openCLdoneKeys / (double)doneKeys);
     846                }, null);
    840847               
    841848
     
    853860            }//end while
    854861
    855             showProgress(costList, 1, 1, 1, 1, 1);
     862            showProgress(costList, 1, 1, 1);
    856863
    857864            //wake up all sleeping threads, so they can stop:
     
    904911        }
    905912
    906         internal void showProgress(LinkedList<ValueKey> costList, BigInteger size, BigInteger keycounter, long keysPerSecond, long openCLkeysPerSecond, double openclRatio)
     913        internal void showProgress(LinkedList<ValueKey> costList, BigInteger size, BigInteger keycounter, long keysPerSecond)
    907914        {
    908915            System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
     
    978985                , null);
    979986            }//end if
    980 
    981 
    982987            else if (!stop && localQuickWatchPresentation.IsVisible)
    983988            {
     
    10051010                , null);
    10061011            }
    1007 
    1008             //show openCL keys/sec:
    1009             ((QuickWatch)QuickWatchPresentation).Dispatcher.BeginInvoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    1010                     {
    1011                         ((QuickWatch)QuickWatchPresentation).OpenCLPresentation.keysPerSecond.Content = String.Format("{0:N}", openCLkeysPerSecond);
    1012                         ((QuickWatch)QuickWatchPresentation).OpenCLPresentation.ratio.Content = String.Format("{0:P}", openclRatio);
    1013                     }, null);
    1014 
    10151012        }
    10161013
  • trunk/CrypPlugins/KeySearcher/P2P/DistributedBruteForceManager.cs

    r2146 r2150  
    265265            if (!keySearcher.stop && keyPoolTree.IsCalculationFinished())
    266266            {
    267                 keySearcher.showProgress(keySearcher.costList, 1, 1, 1, 1, 1);
     267                keySearcher.showProgress(keySearcher.costList, 1, 1, 1);
    268268                keySearcher.GuiLogMessage("Calculation complete.", NotificationLevel.Info);
    269269                keyPoolTree.UpdateStatusForFinishedCalculation();
Note: See TracChangeset for help on using the changeset viewer.