69 references to Size
Microsoft.ML.CpuMath (36)
AlignedMatrix.cs (3)
74Contracts.Assert(0 < _size && _size <= _items.Size); 77for (int i = _size; i < _items.Size; i++) 330Contracts.Assert(RunLenPhy * RunCntPhy == Items.Size);
AvxIntrinsics.cs (1)
58Contracts.Assert(alignedArray.Size > 0);
CpuAligenedMathUtils.cs (2)
75Contracts.Assert(m.ColCountPhy == A(src).Items.Size); 76Contracts.Assert(m.RowCountPhy == A(dst).Items.Size);
CpuMathUtils.netcoreapp.cs (28)
41Contracts.Assert(matrix.Size == destination.Size * source.Size); 48Contracts.Assert(stride <= destination.Size); 49AvxIntrinsics.MatMul(matrix, source, destination, stride, source.Size); 53Contracts.Assert(stride <= source.Size); 54AvxIntrinsics.MatMulTran(matrix, source, destination, destination.Size, stride); 61Contracts.Assert(stride <= destination.Size); 62SseIntrinsics.MatMul(matrix, source, destination, stride, source.Size); 66Contracts.Assert(stride <= source.Size); 67SseIntrinsics.MatMulTran(matrix, source, destination, destination.Size, stride); 74Contracts.Assert(stride <= destination.Size); 78for (int j = 0; j < source.Size; j++) 80dotProduct += matrix[i * source.Size + j] * source[j]; 88Contracts.Assert(stride <= source.Size); 89for (int i = 0; i < destination.Size; i++) 94dotProduct += matrix[j * destination.Size + i] * source[j]; 120Contracts.Assert(matrix.Size == destination.Size * sourceValues.Size); 133Contracts.Assert(stride <= destination.Size); 134AvxIntrinsics.MatMulP(matrix, rgposSrc, sourceValues, posMin, iposMin, iposLimit, destination, stride, sourceValues.Size); 138Contracts.Assert(stride <= destination.Size); 139SseIntrinsics.MatMulP(matrix, rgposSrc, sourceValues, posMin, iposMin, iposLimit, destination, stride, sourceValues.Size); 143Contracts.Assert(stride <= destination.Size); 150dotProduct += matrix[i * sourceValues.Size + col] * sourceValues[col]; 461ZeroItemsU(destination, destination.Size, indices, indices.Length); 465ZeroMatrixItemsCore(destination, destination.Size, ccol, cfltRow, indices, indices.Length);
FactorizationMachine\FactorizationMachineInterface.cs (1)
19Contracts.Assert(a.Size > 0);
SseIntrinsics.cs (1)
53Contracts.Assert(alignedArray.Size > 0);
Microsoft.ML.CpuMath.PerformanceTests (3)
NativePerformanceTests.cs (3)
248Thunk.MatMul(Ptr(testMatrixAligned, pmat), Ptr(testSrcVectorAligned, psrc), Ptr(testDstVectorAligned, pdst), matrixLength, testSrcVectorAligned.Size); 257Thunk.MatMulTran(Ptr(testMatrixAligned, pmat), Ptr(testSrcVectorAligned, psrc), Ptr(testDstVectorAligned, pdst), testDstVectorAligned.Size, matrixLength); 267Thunk.MatMulP(Ptr(testMatrixAligned, pmat), ppossrc, Ptr(testSrcVectorAligned, psrc), 0, 0, MatrixIndexLength, Ptr(testDstVectorAligned, pdst), matrixLength, testSrcVectorAligned.Size);
Microsoft.ML.CpuMath.UnitTests (28)
UnitTests.cs (28)
249float[] expected = new float[dst.Size]; 250for (int i = 0; i < dst.Size; i++) 253for (int j = 0; j < src.Size; j++) 255dotProduct += mat[i * src.Size + j] * src[j]; 260CpuMathUtils.MatrixTimesSource(false, mat, src, dst, dst.Size); 261float[] actual = new float[dst.Size]; 262dst.CopyTo(actual, 0, dst.Size); 283float[] expected = new float[dst.Size]; 284for (int i = 0; i < dst.Size; i++) 287for (int j = 0; j < src.Size; j++) 289dotProduct += mat[j * dst.Size + i] * src[j]; 294CpuMathUtils.MatrixTimesSource(true, mat, src, dst, src.Size); 295float[] actual = new float[dst.Size]; 296dst.CopyTo(actual, 0, dst.Size); 317float[] expected = new float[dst.Size]; 319for (int i = 0; i < dst.Size; i++) 325dotProduct += mat[i * src.Size + col] * src[col]; 330CpuMathUtils.MatrixTimesSource(mat, idx, src, 0, 0, limit, dst, dst.Size); 331float[] actual = new float[dst.Size]; 332dst.CopyTo(actual, 0, dst.Size); 905CpuMathUtils.ZeroMatrixItems(src, src.Size, src.Size, idx); 906float[] actual = new float[src.Size]; 907src.CopyTo(actual, 0, src.Size); 919CpuMathUtils.ZeroMatrixItems(src, src.Size / 2 - 1, src.Size / 2, idx); 920float[] actual = new float[src.Size]; 921src.CopyTo(actual, 0, src.Size);
Microsoft.ML.StandardTrainers (2)
FactorizationMachine\FieldAwareFactorizationMachineModelParameters.cs (2)
119Host.Assert(latentWeightsAligned.Size == checked(featureCount * fieldCount * LatentDimAligned)); 206Host.Assert(_latentWeightsAligned.Size == FeatureCount * FieldCount * LatentDimAligned);