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
- NativeWindow.cs
- EpmContentSerializerBase.cs
- XsltOutput.cs
- StreamReader.cs
- SessionIDManager.cs
- DataServiceHost.cs
- DataGridViewTextBoxCell.cs
- ModulesEntry.cs
- PixelFormatConverter.cs
- DynamicPropertyHolder.cs
- DBSqlParserColumnCollection.cs
- GraphicsPathIterator.cs
- PrintDialogException.cs
- ListViewTableCell.cs
- WindowsSpinner.cs
- DataServiceStreamResponse.cs
- CheckPair.cs
- PropertyStore.cs
- ComponentRenameEvent.cs
- CodeCommentStatementCollection.cs
- WindowPattern.cs
- _LocalDataStore.cs
- UnsafeCollabNativeMethods.cs
- ClonableStack.cs
- TypeSemantics.cs
- MaterialGroup.cs
- KeyTime.cs
- RelationshipEndMember.cs
- TableItemPatternIdentifiers.cs
- ConnectionManagementElement.cs
- IntSecurity.cs
- ToolboxItemFilterAttribute.cs
- OLEDB_Util.cs
- EntityParameter.cs
- AddInIpcChannel.cs
- CroppedBitmap.cs
- DbConnectionPoolIdentity.cs
- HotSpotCollection.cs
- EnumBuilder.cs
- TdsEnums.cs
- ExpressionQuoter.cs
- PointLightBase.cs
- Annotation.cs
- FunctionMappingTranslator.cs
- GenericTypeParameterBuilder.cs
- XamlClipboardData.cs
- XPathNode.cs
- BuildProviderUtils.cs
- SmiEventSink.cs
- DataBoundLiteralControl.cs
- DataGridTablesFactory.cs
- TypeUtil.cs
- ValidationEventArgs.cs
- ZipPackage.cs
- Dynamic.cs
- EventProxy.cs
- FileFormatException.cs
- DashStyle.cs
- WindowsFont.cs
- formatter.cs
- MetricEntry.cs
- keycontainerpermission.cs
- DataServiceRequestOfT.cs
- CreateUserErrorEventArgs.cs
- StringConcat.cs
- PropertyTabChangedEvent.cs
- TransformerInfo.cs
- SqlCacheDependencyDatabase.cs
- AppSettingsReader.cs
- MatchNoneMessageFilter.cs
- AttributeData.cs
- BamlTreeNode.cs
- DodSequenceMerge.cs
- PtsPage.cs
- HttpBindingExtension.cs
- SettingsBindableAttribute.cs
- HttpDebugHandler.cs
- HMAC.cs
- Sequence.cs
- ProcessThread.cs
- ConstantSlot.cs
- ImageCreator.cs
- InProcStateClientManager.cs
- TypeAccessException.cs
- GeneralTransform3DGroup.cs
- SortedSetDebugView.cs
- RegexMatch.cs
- AutoCompleteStringCollection.cs
- ImageFormat.cs
- OleDbDataAdapter.cs
- NamedElement.cs
- MatrixCamera.cs
- PolyBezierSegmentFigureLogic.cs
- PropertyIDSet.cs
- DeflateStream.cs
- TransportManager.cs
- InfocardChannelParameter.cs
- ClockController.cs
- SqlRowUpdatingEvent.cs
- PostBackOptions.cs