Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / System / Linq / Parallel / Partitioning / UnorderedHashRepartitionStream.cs / 1305376 / UnorderedHashRepartitionStream.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== // =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ // // UnorderedHashRepartitionStream.cs // //[....] // // =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- using System.Collections.Generic; using System.Threading; namespace System.Linq.Parallel { internal class UnorderedHashRepartitionStream: HashRepartitionStream { //---------------------------------------------------------------------------------------- // Creates a new partition exchange operator. // internal UnorderedHashRepartitionStream( PartitionedStream inputStream, Func keySelector, IEqualityComparer keyComparer, IEqualityComparer elementComparer, CancellationToken cancellationToken) : base(inputStream.PartitionCount, Util.GetDefaultComparer (), keyComparer, elementComparer) { // Create our array of partitions. m_partitions = new HashRepartitionEnumerator [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]; // Now construct each partition object. for (int i = 0; i < inputStream.PartitionCount; i++) { m_partitions[i] = new HashRepartitionEnumerator ( inputStream[i], inputStream.PartitionCount, i, keySelector, this, barrier, valueExchangeMatrix, 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
- ButtonFieldBase.cs
- Track.cs
- Shape.cs
- HtmlFormWrapper.cs
- GcHandle.cs
- EndOfStreamException.cs
- SelectManyQueryOperator.cs
- ComponentDispatcherThread.cs
- TableProvider.cs
- Dynamic.cs
- UpdateManifestForBrowserApplication.cs
- SessionEndedEventArgs.cs
- LightweightEntityWrapper.cs
- SingleSelectRootGridEntry.cs
- DataGridViewCellStyleConverter.cs
- XmlTypeAttribute.cs
- ServiceDescription.cs
- TextEffectCollection.cs
- StorageModelBuildProvider.cs
- processwaithandle.cs
- SqlCacheDependencySection.cs
- DataContractJsonSerializer.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ToolStripOverflowButton.cs
- DecimalAnimation.cs
- LazyTextWriterCreator.cs
- SamlAction.cs
- BamlRecordHelper.cs
- BooleanAnimationUsingKeyFrames.cs
- ClientFormsIdentity.cs
- TdsParameterSetter.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- Attributes.cs
- ReferencedType.cs
- UIElement3DAutomationPeer.cs
- HtmlValidationSummaryAdapter.cs
- SafeSecurityHelper.cs
- XamlWriterExtensions.cs
- BamlVersionHeader.cs
- XPathScanner.cs
- base64Transforms.cs
- XmlDigitalSignatureProcessor.cs
- TransformGroup.cs
- Pen.cs
- TextSelection.cs
- NameValueSectionHandler.cs
- TimeSpanConverter.cs
- UInt32.cs
- GridViewUpdateEventArgs.cs
- BuildProviderCollection.cs
- StrongNameIdentityPermission.cs
- HttpStaticObjectsCollectionWrapper.cs
- ContentAlignmentEditor.cs
- XmlSchemaObjectCollection.cs
- Grant.cs
- OleDbParameterCollection.cs
- PriorityQueue.cs
- UrlParameterWriter.cs
- TagPrefixCollection.cs
- _SslState.cs
- TiffBitmapEncoder.cs
- CompilerInfo.cs
- HtmlHistory.cs
- TargetConverter.cs
- WebPartHeaderCloseVerb.cs
- ResourceAttributes.cs
- AQNBuilder.cs
- HandleInitializationContext.cs
- RestClientProxyHandler.cs
- CryptoKeySecurity.cs
- RecordBuilder.cs
- SQLGuid.cs
- DataSourceDesigner.cs
- Stroke.cs
- BitmapMetadataBlob.cs
- ToolStripOverflowButton.cs
- GenericAuthenticationEventArgs.cs
- MenuItemBindingCollection.cs
- MetadataItemEmitter.cs
- CollectionEditorDialog.cs
- Buffer.cs
- HuffCodec.cs
- DeferredSelectedIndexReference.cs
- File.cs
- RoleGroupCollection.cs
- ItemChangedEventArgs.cs
- DataPagerCommandEventArgs.cs
- SafeIUnknown.cs
- ProgressBarAutomationPeer.cs
- TypeBuilderInstantiation.cs
- PixelFormatConverter.cs
- OrderPreservingMergeHelper.cs
- InternalPolicyElement.cs
- TabletCollection.cs
- HttpWriter.cs
- TabletDeviceInfo.cs
- InputLanguageEventArgs.cs
- WeakReferenceList.cs
- CodeArgumentReferenceExpression.cs
- HttpCacheVaryByContentEncodings.cs