@@ -122,9 +122,6 @@ public static unsafe void MatMul(AlignedArray mat, AlignedArray src, AlignedArra
122
122
123
123
public static unsafe void MatMul ( ReadOnlySpan < float > mat , ReadOnlySpan < float > src , Span < float > dst , int crow , int ccol )
124
124
{
125
- Contracts . Assert ( crow % 4 == 0 ) ;
126
- Contracts . Assert ( ccol % 4 == 0 ) ;
127
-
128
125
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
129
126
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
130
127
fixed ( float * pmat = & MemoryMarshal . GetReference ( mat ) )
@@ -285,9 +282,6 @@ public static unsafe void MatMulP(AlignedArray mat, ReadOnlySpan<int> rgposSrc,
285
282
public static unsafe void MatMulP ( ReadOnlySpan < float > mat , ReadOnlySpan < int > rgposSrc , ReadOnlySpan < float > src ,
286
283
int posMin , int iposMin , int iposEnd , Span < float > dst , int crow , int ccol )
287
284
{
288
- Contracts . Assert ( crow % 4 == 0 ) ;
289
- Contracts . Assert ( ccol % 4 == 0 ) ;
290
-
291
285
// REVIEW: For extremely sparse inputs, interchanging the loops would
292
286
// likely be more efficient.
293
287
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
@@ -448,9 +442,6 @@ public static unsafe void MatMulTran(AlignedArray mat, AlignedArray src, Aligned
448
442
449
443
public static unsafe void MatMulTran ( ReadOnlySpan < float > mat , ReadOnlySpan < float > src , Span < float > dst , int crow , int ccol )
450
444
{
451
- Contracts . Assert ( crow % 4 == 0 ) ;
452
- Contracts . Assert ( ccol % 4 == 0 ) ;
453
-
454
445
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
455
446
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
456
447
fixed ( float * pmat = & MemoryMarshal . GetReference ( mat ) )
@@ -893,8 +884,6 @@ public static unsafe void Scale(float scale, Span<float> dst)
893
884
894
885
public static unsafe void ScaleSrcU ( float scale , ReadOnlySpan < float > src , Span < float > dst , int count )
895
886
{
896
- Contracts . Assert ( src . Length == dst . Length ) ;
897
-
898
887
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
899
888
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
900
889
{
@@ -963,8 +952,6 @@ public static unsafe void ScaleAddU(float a, float b, Span<float> dst)
963
952
964
953
public static unsafe void AddScaleU ( float scale , ReadOnlySpan < float > src , Span < float > dst , int count )
965
954
{
966
- Contracts . Assert ( src . Length == dst . Length ) ;
967
-
968
955
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
969
956
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
970
957
{
@@ -1004,8 +991,6 @@ public static unsafe void AddScaleU(float scale, ReadOnlySpan<float> src, Span<f
1004
991
1005
992
public static unsafe void AddScaleCopyU ( float scale , ReadOnlySpan < float > src , ReadOnlySpan < float > dst , Span < float > result , int count )
1006
993
{
1007
- Contracts . Assert ( src . Length == dst . Length ) ;
1008
-
1009
994
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
1010
995
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
1011
996
fixed ( float * pres = & MemoryMarshal . GetReference ( result ) )
@@ -1047,8 +1032,6 @@ public static unsafe void AddScaleCopyU(float scale, ReadOnlySpan<float> src, Re
1047
1032
1048
1033
public static unsafe void AddScaleSU ( float scale , ReadOnlySpan < float > src , ReadOnlySpan < int > idx , Span < float > dst , int count )
1049
1034
{
1050
- Contracts . Assert ( src . Length == dst . Length ) ;
1051
-
1052
1035
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
1053
1036
fixed ( int * pidx = & MemoryMarshal . GetReference ( idx ) )
1054
1037
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
@@ -1085,8 +1068,6 @@ public static unsafe void AddScaleSU(float scale, ReadOnlySpan<float> src, ReadO
1085
1068
1086
1069
public static unsafe void AddU ( ReadOnlySpan < float > src , Span < float > dst , int count )
1087
1070
{
1088
- Contracts . Assert ( src . Length == dst . Length ) ;
1089
-
1090
1071
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
1091
1072
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
1092
1073
{
@@ -1122,8 +1103,6 @@ public static unsafe void AddU(ReadOnlySpan<float> src, Span<float> dst, int cou
1122
1103
1123
1104
public static unsafe void AddSU ( ReadOnlySpan < float > src , ReadOnlySpan < int > idx , Span < float > dst , int count )
1124
1105
{
1125
- Contracts . Assert ( src . Length == dst . Length ) ;
1126
-
1127
1106
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
1128
1107
fixed ( int * pidx = & MemoryMarshal . GetReference ( idx ) )
1129
1108
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
@@ -1157,9 +1136,6 @@ public static unsafe void AddSU(ReadOnlySpan<float> src, ReadOnlySpan<int> idx,
1157
1136
1158
1137
public static unsafe void MulElementWiseU ( ReadOnlySpan < float > src1 , ReadOnlySpan < float > src2 , Span < float > dst , int count )
1159
1138
{
1160
- Contracts . Assert ( src1 . Length == dst . Length ) ;
1161
- Contracts . Assert ( src2 . Length == dst . Length ) ;
1162
-
1163
1139
fixed ( float * psrc1 = & MemoryMarshal . GetReference ( src1 ) )
1164
1140
fixed ( float * psrc2 = & MemoryMarshal . GetReference ( src2 ) )
1165
1141
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
@@ -1494,8 +1470,6 @@ public static unsafe float MaxAbsDiffU(float mean, ReadOnlySpan<float> src)
1494
1470
1495
1471
public static unsafe float DotU ( ReadOnlySpan < float > src , ReadOnlySpan < float > dst , int count )
1496
1472
{
1497
- Contracts . Assert ( src . Length == dst . Length ) ;
1498
-
1499
1473
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
1500
1474
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
1501
1475
{
@@ -1535,8 +1509,6 @@ public static unsafe float DotU(ReadOnlySpan<float> src, ReadOnlySpan<float> dst
1535
1509
1536
1510
public static unsafe float DotSU ( ReadOnlySpan < float > src , ReadOnlySpan < float > dst , ReadOnlySpan < int > idx , int count )
1537
1511
{
1538
- Contracts . Assert ( src . Length == dst . Length ) ;
1539
-
1540
1512
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
1541
1513
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
1542
1514
fixed ( int * pidx = & MemoryMarshal . GetReference ( idx ) )
@@ -1578,8 +1550,6 @@ public static unsafe float DotSU(ReadOnlySpan<float> src, ReadOnlySpan<float> ds
1578
1550
1579
1551
public static unsafe float Dist2 ( ReadOnlySpan < float > src , ReadOnlySpan < float > dst , int count )
1580
1552
{
1581
- Contracts . Assert ( src . Length == dst . Length ) ;
1582
-
1583
1553
fixed ( float * psrc = & MemoryMarshal . GetReference ( src ) )
1584
1554
fixed ( float * pdst = & MemoryMarshal . GetReference ( dst ) )
1585
1555
{
0 commit comments