From d77909b630003d7c4763a65c170b7c08e0aac2ea Mon Sep 17 00:00:00 2001 From: Christian Sigg Date: Mon, 6 Jan 2025 08:24:42 +0100 Subject: [PATCH] Don't skip for a single column. E.g. the matrix `[0, 1]^T` should get transformed to `[1, 0]^T`. --- third_party/f2reduce/f2reduce.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/f2reduce/f2reduce.cpp b/third_party/f2reduce/f2reduce.cpp index ad074b516b2d..546335ca798f 100644 --- a/third_party/f2reduce/f2reduce.cpp +++ b/third_party/f2reduce/f2reduce.cpp @@ -470,8 +470,8 @@ namespace f2reduce { void inplace_rref_strided(uint64_t *matrix, uint64_t rows, uint64_t cols, uint64_t stride) { - if (rows <= 1 || cols <= 1) { - // If the matrix has 0 or 1 rows or columns, it must already be in RREF: + if (rows <= 1 || cols == 0) { + // If the matrix has 0 or 1 rows or 0 columns, it must already be in RREF: return; }