63 references to ArrayMaxSize
Microsoft.ML.Core (9)
Utilities\BigArray.cs (4)
14/// <see cref="Utils.ArrayMaxSize"/> many entries, up to 0x7FEFFFFF00000L. 35private const long MaxSize = (long)Utils.ArrayMaxSize << BlockSizeBits; 104Contracts.Assert(longBlockCount <= Utils.ArrayMaxSize); 226Contracts.Assert(0 < longBlockCount && longBlockCount <= Utils.ArrayMaxSize);
Utilities\HybridMemoryStream.cs (4)
52if (!(0 <= maxLen && maxLen <= Utils.ArrayMaxSize)) 53throw Contracts.ExceptParam(nameof(maxLen), "must be in range [0,{0}]", Utils.ArrayMaxSize); 72if (!(0 <= maxLen && maxLen <= Utils.ArrayMaxSize)) 73throw Contracts.ExceptParam(nameof(maxLen), "must be in range [0,{0}]", Utils.ArrayMaxSize);
Utilities\Utils.cs (1)
925return EnsureSize(ref array, min, Utils.ArrayMaxSize, keepOld);
Microsoft.ML.Data (21)
DataView\CacheDataView.cs (7)
95if (_rowCount > Utils.ArrayMaxSize) 96throw _host.Except("The input data view has too many ({0}) rows. CacheDataView can only cache up to {1} rows", _rowCount, Utils.ArrayMaxSize); 238if (rc > Utils.ArrayMaxSize) 402if (rowCount > Utils.ArrayMaxSize) 403throw _host.Except("The input data view has too many ({0}) rows. CacheDataView can only cache up to {1} rows", rowCount, Utils.ArrayMaxSize); 417if (_rowCount > Utils.ArrayMaxSize) 418throw _host.Except("The input data view has too many ({0}) rows. CacheDataView can only cache up to {1} rows", _rowCount, Utils.ArrayMaxSize);
DataView\Transposer.cs (2)
187if (rowCount > Utils.ArrayMaxSize) 188throw _host.ExceptParam(nameof(view), "View has {0} rows, we cannot transpose with more than {1}", rowCount, Utils.ArrayMaxSize);
Training\TrainerUtils.cs (2)
147if (keyType.Count >= Utils.ArrayMaxSize) 176if (max >= Utils.ArrayMaxSize)
Transforms\SlotsDroppingTransformer.cs (1)
502=> (type is KeyDataViewType keytype && 0 < keytype.Count && keytype.Count < Utils.ArrayMaxSize)
Utils\SequencePool.cs (9)
237Contracts.Check(_start.Length != Utils.ArrayMaxSize, "Cannot allocate memory for the sequence pool"); 240int size = (newSize > Utils.ArrayMaxSize) ? Utils.ArrayMaxSize : (int)newSize; 247Contracts.Check(_next.Length != Utils.ArrayMaxSize, "Cannot allocate memory for the sequence pool"); 250int size = (newSize > Utils.ArrayMaxSize) ? Utils.ArrayMaxSize : (int)newSize; 259Contracts.Check(_bytes.Length != Utils.ArrayMaxSize, "Cannot allocate memory for the sequence pool"); 261int size = (newSize > Utils.ArrayMaxSize) ? Utils.ArrayMaxSize : (int)newSize;
Microsoft.ML.FastTree (7)
FastTree.cs (4)
1776if (numInstances > Utils.ArrayMaxSize) 1777throw Host.ExceptParam(nameof(data), "Input data had {0} rows, but can only accommodate {1}", numInstances, Utils.ArrayMaxSize); 2239if (countBins > Utils.ArrayMaxSize - (bup.Length - 1)) 2247ch.Assert(0 < countBins && countBins <= Utils.ArrayMaxSize);
RandomForestRegression.cs (3)
554if (!(0 <= lab && lab < Utils.ArrayMaxSize)) 558"[0,{2}) when doing shuffled labels", lab, i, Utils.ArrayMaxSize); 561Contracts.Assert(1 <= lim && lim <= Utils.ArrayMaxSize);
Microsoft.ML.KMeansClustering (2)
KMeansPlusPlusTrainer.cs (2)
477if (baseMaxInstancesToAccelerate > Utils.ArrayMaxSize) 478baseMaxInstancesToAccelerate = Utils.ArrayMaxSize;
Microsoft.ML.LightGbm (4)
LightGbmTrainerBase.cs (4)
785if (labelList.Count == Utils.ArrayMaxSize) 786throw ch.Except($"Dataset row count exceeded the maximum count of {Utils.ArrayMaxSize}"); 1048if ((long)catMetaData.NumCol * batchRow > Utils.ArrayMaxSize) 1049throw ch.Except("Size of array exceeded the " + nameof(Utils.ArrayMaxSize));
Microsoft.ML.Mkl.Components (1)
VectorWhitening.cs (1)
229if (valueCount * valueCount > Utils.ArrayMaxSize)
Microsoft.ML.StandardTrainers (12)
FactorizationMachine\FactorizationMachineTrainer.cs (1)
431ch.Check(checked(totalFeatureCount * fieldCount * _latentDimAligned) <= Utils.ArrayMaxSize, "Latent dimension or the number of fields too large");
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (1)
149Host.Check(checked(featureCount * fieldCount * LatentDimAligned) <= Utils.ArrayMaxSize, "Latent dimension too large");
Standard\LogisticRegression\LbfgsPredictorBase.cs (2)
443if (NumFeatures >= Utils.ArrayMaxSize / ClassCount) 446"The number of model parameters which is equal to ('# of features' + 1) * '# of classes' should be less than or equal to {0}.", Utils.ArrayMaxSize);
Standard\SdcaBinary.cs (7)
506if (dualsLength <= Utils.ArrayMaxSize) 512Contracts.Assert(invariantsLength <= Utils.ArrayMaxSize); 530if (dualsLength <= Utils.ArrayMaxSize) 533Contracts.Assert(count <= Utils.ArrayMaxSize); 568Contracts.Assert((idToIdx == null && ((long)idLoMax + 1) * weightSetCount <= Utils.ArrayMaxSize) || (idToIdx != null && count * weightSetCount <= Utils.ArrayMaxSize)); 1062Contracts.Assert(length <= Utils.ArrayMaxSize);
Standard\SdcaMulticlass.cs (1)
474Contracts.Assert(0 < length && length <= Utils.ArrayMaxSize);
Microsoft.ML.Transforms (7)
MutualInformationFeatureSelection.cs (4)
406(0 < keyCount && keyCount < Utils.ArrayMaxSize) || type is BooleanDataViewType || 554Contracts.Assert(labelKeyCount < Utils.ArrayMaxSize); 632Contracts.Assert(keyCount < Utils.ArrayMaxSize); 646Contracts.Assert(0 < keyCount && keyCount < Utils.ArrayMaxSize);
PermutationFeatureImportance.cs (1)
39topExamples = topExamples ?? Utils.ArrayMaxSize;
Text\NgramTransform.cs (1)
256helpers[iinfo] = new NgramBufferBuilder(ngramLength, skipLength, Utils.ArrayMaxSize,
Text\StopWordsRemovingTransformer.cs (1)
153Contracts.Assert(maxValue < Utils.ArrayMaxSize);