Ignore:
Timestamp:
Nov 14, 2010, 6:03:32 PM (11 years ago)
Author:
Sven Rech
Message:

keysearcher opencl fix

File:
1 edited

Legend:

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

    r2086 r2087  
    429429        private unsafe bool BruteforceOpenCL(KeySearcherOpenCLCode keySearcherOpenCLCode, IKeyTranslator keyTranslator, IControlEncryption sender, int bytesToUse)
    430430        {
    431             float[] costArray = new float[keySearcherOpenCLCode.GetBruteforceBlock()];
     431            float[] costArray = null;
    432432            try
    433433            {
    434434                Kernel bruteforceKernel = keySearcherOpenCLCode.GetBruteforceKernel(oclManager, keyTranslator);
     435                costArray = new float[keyTranslator.GetOpenCLBatchSize()];
    435436                int deviceIndex = settings.OpenCLDevice;
    436437               
    437438                Mem costs = oclManager.Context.CreateBuffer(MemFlags.READ_ONLY, costArray.Length * 4);
    438                 IntPtr[] globalWorkSize = { (IntPtr)keySearcherOpenCLCode.GetBruteforceBlock() };
     439                IntPtr[] globalWorkSize = { (IntPtr)keyTranslator.GetOpenCLBatchSize() };
    439440
    440441                Mem userKey;
Note: See TracChangeset for help on using the changeset viewer.