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
- UrlMapping.cs
- RootProfilePropertySettingsCollection.cs
- RealProxy.cs
- Unit.cs
- SpeakProgressEventArgs.cs
- UIElementAutomationPeer.cs
- WebBrowserSiteBase.cs
- Block.cs
- SocketElement.cs
- EntityViewGenerator.cs
- WebPartEditVerb.cs
- ControlBuilderAttribute.cs
- ClientScriptManagerWrapper.cs
- SmiEventSink_DeferedProcessing.cs
- AndMessageFilter.cs
- DependencyPropertyKey.cs
- SystemParameters.cs
- XPathItem.cs
- sqlnorm.cs
- ConfigPathUtility.cs
- ComponentEditorForm.cs
- documentsequencetextview.cs
- XmlSchemaSimpleContentRestriction.cs
- StaticFileHandler.cs
- CodeCompiler.cs
- MissingFieldException.cs
- ToolZone.cs
- CommandLibraryHelper.cs
- Resources.Designer.cs
- CatalogZoneBase.cs
- TransformerInfo.cs
- CodeTypeReference.cs
- Domain.cs
- ConstNode.cs
- DependencySource.cs
- CultureInfoConverter.cs
- DropDownList.cs
- Frame.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- ColumnTypeConverter.cs
- TdsRecordBufferSetter.cs
- ServicePointManager.cs
- EventlogProvider.cs
- DesignerActionPanel.cs
- OdbcConnectionOpen.cs
- DocumentPageHost.cs
- SetterBase.cs
- OleServicesContext.cs
- wmiprovider.cs
- XmlStringTable.cs
- StyleHelper.cs
- StandardCommands.cs
- FieldTemplateUserControl.cs
- WorkflowInstance.cs
- GregorianCalendar.cs
- CornerRadius.cs
- DbConnectionInternal.cs
- ComponentResourceManager.cs
- DBPropSet.cs
- TemplateControlParser.cs
- ComponentResourceKeyConverter.cs
- InputLangChangeEvent.cs
- SortQuery.cs
- BoundingRectTracker.cs
- Attachment.cs
- xamlnodes.cs
- embossbitmapeffect.cs
- NumberFormatInfo.cs
- DataGridColumn.cs
- CodeEntryPointMethod.cs
- SelectiveScrollingGrid.cs
- XmlMemberMapping.cs
- PermissionAttributes.cs
- SimpleApplicationHost.cs
- HashCodeCombiner.cs
- RadioButtonStandardAdapter.cs
- ExtenderProvidedPropertyAttribute.cs
- OutputCacheProfileCollection.cs
- Timeline.cs
- SqlMethods.cs
- ClickablePoint.cs
- ProcessModule.cs
- DataObjectSettingDataEventArgs.cs
- MatrixAnimationBase.cs
- BindValidationContext.cs
- ModelProperty.cs
- WebPartDescription.cs
- RequestQueryProcessor.cs
- SqlClientFactory.cs
- DeferredElementTreeState.cs
- X509Certificate2Collection.cs
- BookmarkScopeHandle.cs
- Normalizer.cs
- DesignTimeTemplateParser.cs
- StringValidatorAttribute.cs
- MemberNameValidator.cs
- ToolStripRendererSwitcher.cs
- __Filters.cs
- SoapUnknownHeader.cs
- BoundsDrawingContextWalker.cs