Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / Partitioning / OrderedHashRepartitionStream.cs / 1305376 / OrderedHashRepartitionStream.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // OrderedHashRepartitionStream.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; using System.Threading; namespace System.Linq.Parallel { internal class OrderedHashRepartitionStream: HashRepartitionStream { internal OrderedHashRepartitionStream( PartitionedStream inputStream, Func hashKeySelector, IEqualityComparer hashKeyComparer, IEqualityComparer elementComparer, CancellationToken cancellationToken) : base(inputStream.PartitionCount, inputStream.KeyComparer, hashKeyComparer, elementComparer) { m_partitions = new OrderedHashRepartitionEnumerator [inputStream.PartitionCount]; // Initialize state shared among the partitions. A latch and a matrix of buffers. Note that // the actual elements in the buffer array are lazily allocated if needed. CountdownEvent barrier = new CountdownEvent(inputStream.PartitionCount); ListChunk >[,] valueExchangeMatrix = new ListChunk >[inputStream.PartitionCount, inputStream.PartitionCount]; ListChunk [,] keyExchangeMatrix = new ListChunk [inputStream.PartitionCount, inputStream.PartitionCount]; // Now construct each partition object. for (int i = 0; i < inputStream.PartitionCount; i++) { m_partitions[i] = new OrderedHashRepartitionEnumerator ( inputStream[i], inputStream.PartitionCount, i, hashKeySelector, this, barrier, valueExchangeMatrix, keyExchangeMatrix, cancellationToken); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- QueryContinueDragEventArgs.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- TextTreeTextElementNode.cs
- WorkflowMessageEventArgs.cs
- InternalCache.cs
- WorkflowShape.cs
- OracleConnectionFactory.cs
- RegisteredDisposeScript.cs
- DecimalConstantAttribute.cs
- DeadCharTextComposition.cs
- StylusShape.cs
- SelectedGridItemChangedEvent.cs
- BindingCompleteEventArgs.cs
- AdornerPresentationContext.cs
- GridViewPageEventArgs.cs
- AdapterDictionary.cs
- ProgressChangedEventArgs.cs
- TransformProviderWrapper.cs
- DesignerAdapterUtil.cs
- Processor.cs
- AnimationClock.cs
- ClientFormsAuthenticationCredentials.cs
- AppDomainAttributes.cs
- HtmlElement.cs
- TagNameToTypeMapper.cs
- SQLDateTimeStorage.cs
- DeliveryStrategy.cs
- ModifierKeysConverter.cs
- DesignerProperties.cs
- ProcessModuleCollection.cs
- ComplexBindingPropertiesAttribute.cs
- SystemWebCachingSectionGroup.cs
- EnumBuilder.cs
- Recipient.cs
- UriTemplateQueryValue.cs
- HostVisual.cs
- ListParagraph.cs
- ValidationVisibilityAttribute.cs
- AnnotationAdorner.cs
- _NetworkingPerfCounters.cs
- RectangleConverter.cs
- OleDbTransaction.cs
- FormViewCommandEventArgs.cs
- OleDbWrapper.cs
- PersonalizationStateInfoCollection.cs
- ActivityBuilder.cs
- StorageComplexTypeMapping.cs
- ResourceCategoryAttribute.cs
- WebPartVerbsEventArgs.cs
- DBConnection.cs
- AtomEntry.cs
- ServiceContractAttribute.cs
- MethodCallExpression.cs
- Hex.cs
- _CookieModule.cs
- TimeSpanConverter.cs
- DataSourceXmlClassAttribute.cs
- SqlException.cs
- DataGridViewTextBoxEditingControl.cs
- BaseParser.cs
- IncomingWebRequestContext.cs
- GZipDecoder.cs
- FormClosedEvent.cs
- Lease.cs
- dataprotectionpermission.cs
- GeneralTransform2DTo3D.cs
- TrackingRecord.cs
- AuthenticationManager.cs
- MaterialGroup.cs
- ResourcesBuildProvider.cs
- SqlRowUpdatingEvent.cs
- CommandDevice.cs
- ResourceType.cs
- MissingMemberException.cs
- FixedSOMLineCollection.cs
- ObjectTypeMapping.cs
- CapabilitiesState.cs
- QueryContinueDragEvent.cs
- ProtectedProviderSettings.cs
- SecurityElement.cs
- PackWebRequestFactory.cs
- TextFragmentEngine.cs
- TreeNodeCollection.cs
- PingOptions.cs
- ComPlusServiceLoader.cs
- MultiBinding.cs
- RealizationContext.cs
- SerializableAttribute.cs
- DataGridAutoFormat.cs
- ActivityStatusChangeEventArgs.cs
- StrongNameMembershipCondition.cs
- TimeSpanValidatorAttribute.cs
- FormViewInsertEventArgs.cs
- FontStretch.cs
- JsonSerializer.cs
- ParameterSubsegment.cs
- Light.cs
- PropertyHelper.cs
- UserValidatedEventArgs.cs
- ImmComposition.cs