Esempio n. 1
0
        private SubJobResult GetEmptySubJobResult(SubJobResult[] cache, ref int cachePtr, bool readZValues)
        {
            if (cachePtr > cache.Length - 1)
            {
                cachePtr = 0;
            }

            if (cache[cachePtr] == null)
            {
                string instanceName = $"Sub{InstanceNum}";
                cache[cachePtr] = SubJobResult.GetEmptySubJobResult(Size, instanceName, readZValues);
            }
            return(cache[cachePtr++]);
        }
Esempio n. 2
0
        public SubJobResult GetEmptySubJobResult(bool readZValues)
        {
            SubJobResult result;

            if (readZValues)
            {
                result = GetEmptySubJobResult(_emptySubJobResultsWithZValues, ref _nextResultWithZValuesPtr, readZValues);
            }
            else
            {
                result = GetEmptySubJobResult(_emptySubJobResults, ref _nextResultPtr, readZValues);
            }

            SubJobResult.ClearSubJobResult(result);
            return(result);
        }