Exemplo n.º 1
0
        /// <summary>
        /// Gets the snapshot entry of temporary index associated with this memory entry.
        /// </summary>
        /// <param name="context">The context.</param>
        private SnapshotEntry getTemporary(SnapshotBase context)
        {
            Snapshot snapshot = SnapshotEntry.ToSnapshot(context);

            if (temporaryLocation == null)
            {
                temporaryIndex    = snapshot.CreateTemporary();
                temporaryLocation = new SnapshotEntry(MemoryPath.MakePathTemporary(temporaryIndex));

                snapshot.Factories.Benchmark.StartAlgorithm(snapshot, AlgorithmType.MERGE_TO_TEMPORARY);
                snapshot.Algorithms.MergeAlgorithm.MergeMemoryEntry(snapshot, temporaryIndex, dataEntry);
                snapshot.Factories.Benchmark.FinishAlgorithm(snapshot, AlgorithmType.MERGE_TO_TEMPORARY);
            }

            return(temporaryLocation);
        }