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
- AnonymousIdentificationSection.cs
- Exceptions.cs
- DBNull.cs
- RegexMatchCollection.cs
- Panel.cs
- TypeBuilder.cs
- TraceXPathNavigator.cs
- StructuredProperty.cs
- WindowsScrollBar.cs
- SettingsBase.cs
- SqlDataReader.cs
- XmlReader.cs
- ScalarConstant.cs
- TrackingQueryElement.cs
- XmlWrappingReader.cs
- WebPartConnectionsCancelEventArgs.cs
- DocumentSchemaValidator.cs
- HttpValueCollection.cs
- PageCache.cs
- ProvidePropertyAttribute.cs
- ManagementObjectCollection.cs
- CollectionsUtil.cs
- Token.cs
- IndependentAnimationStorage.cs
- printdlgexmarshaler.cs
- InstanceView.cs
- IPipelineRuntime.cs
- FragmentQueryKB.cs
- CompensationHandlingFilter.cs
- ColorPalette.cs
- ChildrenQuery.cs
- HitTestFilterBehavior.cs
- GridViewAutomationPeer.cs
- UserControl.cs
- FormatException.cs
- DesignerCommandSet.cs
- GeometryValueSerializer.cs
- EntityClassGenerator.cs
- AssemblyCollection.cs
- SamlEvidence.cs
- CompositeDataBoundControl.cs
- DataRowCollection.cs
- BitmapEffectState.cs
- SkewTransform.cs
- TemplateDefinition.cs
- StringConverter.cs
- ShaderEffect.cs
- Condition.cs
- NullRuntimeConfig.cs
- DataGridViewCellPaintingEventArgs.cs
- BrowserCapabilitiesFactoryBase.cs
- KeyboardNavigation.cs
- LightweightCodeGenerator.cs
- VoiceSynthesis.cs
- ToolboxBitmapAttribute.cs
- WebPartCatalogAddVerb.cs
- CustomAttributeSerializer.cs
- ConfigurationProviderException.cs
- RangeValuePattern.cs
- DiscoveryInnerClientAdhoc11.cs
- FixedTextBuilder.cs
- ConfigurationManagerHelper.cs
- Propagator.ExtentPlaceholderCreator.cs
- DATA_BLOB.cs
- SupportsEventValidationAttribute.cs
- Rotation3D.cs
- SqlLiftWhereClauses.cs
- OleStrCAMarshaler.cs
- CatalogPart.cs
- log.cs
- ExtendedPropertyCollection.cs
- Page.cs
- ImageUrlEditor.cs
- DynamicDataRoute.cs
- IsolatedStorage.cs
- SafeNativeMethods.cs
- ConfigurationStrings.cs
- IdentityHolder.cs
- SignedInfo.cs
- Interop.cs
- ContextMarshalException.cs
- ConvertBinder.cs
- WpfPayload.cs
- EditableTreeList.cs
- SrgsElementList.cs
- DataServiceKeyAttribute.cs
- PointHitTestParameters.cs
- SpecialTypeDataContract.cs
- XmlSchemaAttributeGroupRef.cs
- ActivityExecutionContextCollection.cs
- RegistrationServices.cs
- ClientData.cs
- ConstNode.cs
- CompressEmulationStream.cs
- Compiler.cs
- EntityCollectionChangedParams.cs
- NonBatchDirectoryCompiler.cs
- Stack.cs
- XmlMembersMapping.cs
- WebControl.cs