Skip to content

Commit 76e2307

Browse files
committed
ADT/Matrix: two-dimensional Container with View
Leverage the excellent SmallVector infrastructure to write a two-dimensional container, along with a View that abstracts out indexing-arithmetic, eliminating memory operations on the underlying storage. The immediate applicability of Matrix is to replace uses of the vector-of-vectors idiom, with one caveat: an upper bound on the number of columns should be known ahead of time.
1 parent c5ee3c0 commit 76e2307

File tree

4 files changed

+767
-1
lines changed

4 files changed

+767
-1
lines changed

llvm/include/llvm/ADT/ArrayRef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace llvm {
5252
using size_type = size_t;
5353
using difference_type = ptrdiff_t;
5454

55-
private:
55+
protected:
5656
/// The start of the array, in an external buffer.
5757
const T *Data = nullptr;
5858

0 commit comments

Comments
 (0)