Ignore:
Timestamp:
Dec 3, 2010, 11:21:05 PM (11 years ago)
Author:
Sven Rech
Message:

keysearcher opencl stuff

File:
1 edited

Legend:

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

    r2158 r2161  
    307307        {
    308308            IsKeySearcherRunning = true;
     309            localBruteForceStopwatch.Reset();
    309310
    310311            //either byte[] CStream input or CryptoolStream Object input
     
    391392            {
    392393                keySearcherOpenCLCode = new KeySearcherOpenCLCode(this, encryptedData, sender, CostMaster, 256 * 256 * 256 * 16);
    393                 keySearcherOpenCLSubbatchOptimizer = new KeySearcherOpenCLSubbatchOptimizer(oclManager.CQ[settings.OpenCLDevice].Device.MaxWorkItemSizes.Aggregate(1, (x, y) => (x * (int)y)) / 8);
     394                keySearcherOpenCLSubbatchOptimizer = new KeySearcherOpenCLSubbatchOptimizer(settings.OpenCLMode, oclManager.CQ[settings.OpenCLDevice].Device.MaxWorkItemSizes.Aggregate(1, (x, y) => (x * (int)y)) / 8);
    394395                ((QuickWatch)QuickWatchPresentation).Dispatcher.BeginInvoke(DispatcherPriority.Normal, (SendOrPostCallback)delegate
    395396                {
     
    483484                    userKey = oclManager.Context.CreateBuffer(MemFlags.USE_HOST_PTR, key.Length, new IntPtr((void*)ukp));
    484485
    485                
    486 
    487486                int subbatches = keySearcherOpenCLSubbatchOptimizer.GetAmountOfSubbatches(keyTranslator);
    488487                int subbatchSize = keyTranslator.GetOpenCLBatchSize() / subbatches;
    489488                ((QuickWatch) QuickWatchPresentation).Dispatcher.BeginInvoke(DispatcherPriority.Normal, (SendOrPostCallback) delegate
    490489                                                                    {
    491                                                                         //((QuickWatch)QuickWatchPresentation).OpenCLPresentation.batches.Content = subbatches;
    492490                                                                        ((QuickWatch)QuickWatchPresentation).OpenCLPresentation.workItems.Content = subbatchSize;
    493491                                                                    }, null);
    494                 GuiLogMessage(string.Format("Now using {0} subbatches", subbatches), NotificationLevel.Info);
     492                //GuiLogMessage(string.Format("Now using {0} subbatches", subbatches), NotificationLevel.Info);
    495493               
    496494                float[] costArray = new float[subbatchSize];
    497495                Mem costs = oclManager.Context.CreateBuffer(MemFlags.READ_WRITE, costArray.Length * 4);
    498                
    499496
    500497                IntPtr[] globalWorkSize = { (IntPtr)subbatchSize };
Note: See TracChangeset for help on using the changeset viewer.