Add parens around size prediates to fix order-of-operations issues
@@ -191,8 +191,8 @@ namespace Tensile
// TODO: this is not quite right since it assumes batchSize(0) is lowest order in index assignments
// If tensor contains multiple batch dims this may not be true.
// Really should modify Contractions.py to select SizeN >= value, based on desired index requirement
- return problem.freeIndicesA().size() ? problem.freeSizeA(0) >= value : problem.batchSize(0) >= value
- && problem.freeIndicesB().size() ? problem.freeSizeB(0) >= value : problem.batchSize(0) >= value;
+ return (problem.freeIndicesA().size() ? problem.freeSizeA(0) >= value : problem.batchSize(0) >= value)
+ && (problem.freeIndicesB().size() ? problem.freeSizeB(0) >= value : problem.batchSize(0) >= value);
}
};
