Constexpr compile time branches

libeigen/eigen!2575
This commit is contained in:
Florian Maurin
2026-05-22 13:18:49 -07:00
committed by Rasmus Munk Larsen
parent 08f574e139
commit 039764e20a
99 changed files with 1592 additions and 1425 deletions
+2 -2
View File
@@ -1293,8 +1293,8 @@ struct cast_test_impl {
static constexpr int MaxPacketSize = internal::plain_enum_max(SrcPacketSize, DstPacketSize);
static void run() {
const Index testRows = RowsAtCompileTime == Dynamic ? ((10 * MaxPacketSize) + 1) : RowsAtCompileTime;
const Index testCols = ColsAtCompileTime == Dynamic ? ((10 * MaxPacketSize) + 1) : ColsAtCompileTime;
constexpr Index testRows = RowsAtCompileTime == Dynamic ? ((10 * MaxPacketSize) + 1) : RowsAtCompileTime;
constexpr Index testCols = ColsAtCompileTime == Dynamic ? ((10 * MaxPacketSize) + 1) : ColsAtCompileTime;
const Index testSize = testRows * testCols;
const Index minTestSize = 100;
const Index repeats = numext::div_ceil(minTestSize, testSize);