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