Skip to content

Commit c824b1c

Browse files
committed
Add back extra space
1 parent 4a4abed commit c824b1c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

highs/ipm/hipo/factorhighs/FormatHandler.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ class FormatHandler {
8888
virtual void extremeEntries() {}
8989
};
9090

91+
const Int64 extra_space = 10;
92+
9193
} // namespace hipo
9294

9395
#endif

highs/ipm/hipo/factorhighs/HybridHybridFormatHandler.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ HybridHybridFormatHandler::HybridHybridFormatHandler(
2121
void HybridHybridFormatHandler::initFrontal() {
2222
const Int n_blocks = (sn_size_ - 1) / nb_ + 1;
2323
diag_start_.resize(n_blocks);
24-
Int64 frontal_size = getDiagStart(ldf_, sn_size_, nb_, n_blocks, diag_start_);
24+
Int64 frontal_size =
25+
getDiagStart(ldf_, sn_size_, nb_, n_blocks, diag_start_) + extra_space;
2526
frontal_.resize(frontal_size);
2627
std::memset(frontal_.data(), 0, frontal_size * sizeof(double));
2728

29+
// extra_space is not needed, but it avoid some weird issue on windows
30+
2831
// frontal_ is actually allocated just the first time, then the memory is
2932
// reused from the previous factorisations and just initialised.
3033
}

highs/ipm/hipo/factorhighs/HybridSolveHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void HybridSolveHandler::backwardSolve(std::vector<double>& x) const {
145145

146146
// index to access snColumns[sn]
147147
// initialised with the total number of entries of snColumns[sn]
148-
Int64 SnCol_ind = sn_columns_[sn].size();
148+
Int64 SnCol_ind = sn_columns_[sn].size() - extra_space;
149149

150150
// go through blocks of columns for this supernode in reverse order
151151
for (Int j = n_blocks - 1; j >= 0; --j) {

0 commit comments

Comments
 (0)