Skip to content

Commit 32a37ac

Browse files
committed
Minor fixes regarding introduction of Span<T>.
1 parent c39b0e4 commit 32a37ac

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CSparse/Storage/CompressedColumnStorage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public override T[] Row(int rowIndex)
309309
{
310310
var target = new T[ColumnCount];
311311

312-
Row(rowIndex, target);
312+
Row(rowIndex, target.AsSpan());
313313

314314
return target;
315315
}
@@ -343,7 +343,7 @@ public override T[] Column(int columnIndex)
343343
{
344344
var target = new T[RowCount];
345345

346-
Column(columnIndex, target);
346+
Column(columnIndex, target.AsSpan());
347347

348348
return target;
349349
}

CSparse/Storage/DenseColumnMajorStorage.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ public override T[] Row(int row)
219219
{
220220
var target = new T[columns];
221221

222-
Row(row, target);
222+
Row(row, target.AsSpan());
223223

224224
return target;
225225
}
@@ -229,7 +229,7 @@ public override T[] Column(int column)
229229
{
230230
var target = new T[rows];
231231

232-
Column(column, target);
232+
Column(column, target.AsSpan());
233233

234234
return target;
235235
}

0 commit comments

Comments
 (0)