예제 #1
0
        public static void ClearSubJobResult(SubJobResult subJobResult)
        {
            if (!subJobResult.IsFree)
            {
                Debug.WriteLine("Clearing a SubJobResult that is still in use.");
            }

            uint[] counts = subJobResult.Counts;
            for (int i = 0; i < counts.Length; i++)
            {
                counts[i] = 0;
            }

            subJobResult.IterationCount = 0;

            bool[] doneFlags = subJobResult.DoneFlags;
            for (int i = 0; i < doneFlags.Length; i++)
            {
                doneFlags[i] = false;
            }

            double[] zValues = subJobResult.ZValues;
            for (int i = 0; i < zValues.Length; i++)
            {
                zValues[i] = 0;
            }
        }
예제 #2
0
        public CountsRepoReader(string repofilename, bool hiRez, int blockWidth, int blockHeight)
        {
            _hiRez      = hiRez;
            _blockWidth = blockWidth;
            int blockLength = blockWidth * blockHeight;

            if (_hiRez)
            {
                _countsRepoHiRez = new ValueRecords <KPoint, SubJobResult>(repofilename, useHiRezFolder: _hiRez);
                _workResultHiRez = SubJobResult.GetEmptySubJobResult(blockLength, "0", false);
            }
            else
            {
                _countsRepo = new ValueRecords <KPoint, MapSectionWorkResult>(repofilename, useHiRezFolder: _hiRez);
                _workResult = new MapSectionWorkResult(blockLength, hiRez: hiRez, includeZValuesOnRead: false);
            }
        }
예제 #3
0
        public static SubJobResult GetEmptySubJobResult(int size, string instanceName, bool includeZValuesOnRead)
        {
            SubJobResult result = new SubJobResult(new uint[size], EMPTY_SUB_JOB_RESULT_MARKER, new double[size * 4], new bool[size], instanceName, size, true, includeZValuesOnRead);

            return(result);
        }