Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/action-sanitizers-bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ jobs:
run: bazel test -c dbg --config=tsan --runs_per_test 5 //...

- name: Upload bazel-testlogs
if: failure()
uses: actions/upload-artifact@v7
with:
name: bazel-testlogs-tsan
Expand Down
2 changes: 1 addition & 1 deletion check/Avgas.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <vector>

#include "util/HighsInt.h"
#include "util/HighsType.h"

const HighsInt avgas_num_col = 8;
const HighsInt avgas_num_row = 10;
Expand Down
2 changes: 1 addition & 1 deletion check/TestCheckSolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ TEST_CASE("check-set-mip-solution", "[highs_check_solution]") {

index.clear();
value.clear();
std::vector<bool> is_set;
std::vector<HighsBool> is_set;
is_set.assign(lp.num_col_, false);
HighsInt num_to_set = 2;
assert(num_to_set > 0);
Expand Down
1 change: 1 addition & 0 deletions cmake/sources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ set(highs_headers
util/HighsHash.h
util/HighsHashTree.h
util/HighsInt.h
util/HighsType.h
util/HighsIntegers.h
util/HighsLinearSumBounds.h
util/HighsMatrixPic.h
Expand Down
2 changes: 1 addition & 1 deletion docs/c_api_gen/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ libhighs_filename = joinpath(@__DIR__, "libhighs.jl")

Generators.build!(
Generators.create_context(
[c_api, joinpath(highs_src, "util", "HighsInt.h")],
[c_api, joinpath(highs_src, "util", "HighsType.h")],
[Generators.get_default_args(); "-I$highs_src"; "-I$(@__DIR__)"],
Dict{String,Any}(
"general" => Dict{String,Any}(
Expand Down
2 changes: 1 addition & 1 deletion highs/Highs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1844,7 +1844,7 @@ class Highs {
HighsStatus getIisInterface();
HighsStatus getIisInterfaceReturn(
const HighsStatus return_status, const HighsOptions& original_options,
const std::vector<bool>& original_callbacks);
const std::vector<HighsBool>& original_callbacks);

HighsStatus elasticityFilterReturn(
const HighsStatus return_status, const std::string& original_model_name,
Expand Down
2 changes: 1 addition & 1 deletion highs/HighsExternalApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "HighsExtrasApi.h"
#include "io/HighsIO.h"
#include "util/HighsDynamicLibrary.h"
#include "util/HighsInt.h"
#include "util/HighsType.h"
#include "util/stringutil.h"

//
Expand Down
2 changes: 1 addition & 1 deletion highs/io/HMPSIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <vector>

#include "io/Filereader.h"
#include "util/HighsInt.h"
#include "util/HighsType.h"

using std::string;
using std::vector;
Expand Down
4 changes: 2 additions & 2 deletions highs/io/HMpsFF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1269,8 +1269,8 @@ HMpsFF::Parsekey HMpsFF::parseBounds(const HighsLogOptions& log_options,
HighsInt num_si = 0;
HighsInt num_sc = 0;

std::vector<bool> has_lower;
std::vector<bool> has_upper;
std::vector<HighsBool> has_lower;
std::vector<HighsBool> has_upper;
has_lower.assign(num_col, false);
has_upper.assign(num_col, false);

Expand Down
6 changes: 3 additions & 3 deletions highs/io/HMpsFF.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#include "io/HighsIO.h"
#include "model/HighsModel.h"
// #include "util/HighsInt.h"
// #include "util/HighsType.h"
#include "util/stringutil.h"

using Triplet = std::tuple<HighsInt, HighsInt, double>;
Expand Down Expand Up @@ -97,7 +97,7 @@ class HMpsFF {
// that are defined as integer by markers in the column section, or
// as binary by having a BV flag in the BOUNDS section, and without
// any LI or UI flags in the BOUNDS section
std::vector<bool> col_binary;
std::vector<HighsBool> col_binary;

// Record where the cost row is encountered
HighsInt cost_row_location;
Expand All @@ -117,7 +117,7 @@ class HMpsFF {
// file for the objective or a row. Have to be class data members so
// that they can be used by parseName and addRhs in HMpsFF::parseRhs
bool has_obj_entry_;
std::vector<bool> has_row_entry_;
std::vector<HighsBool> has_row_entry_;

/// load LP from MPS file as transposed triplet matrix
HighsInt parseFile(std::string filename);
Expand Down
2 changes: 1 addition & 1 deletion highs/ipm/IpxSolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

#include <vector>

#include "util/HighsInt.h"
#include "util/HighsType.h"
typedef HighsInt ipxint;

struct IpxSolution {
Expand Down
2 changes: 1 addition & 1 deletion highs/ipm/hipo/auxiliary/IntConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define HIPO_INT_CONFIG_H

#include "lp_data/HConst.h"
#include "util/HighsInt.h"
#include "util/HighsType.h"

namespace hipo {

Expand Down
2 changes: 1 addition & 1 deletion highs/ipm/hipo/factorhighs/Analyse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void Analyse::fundamentalSupernodes() {
// Find fundamental supernodes.

// isSN[i] is true if node i is the start of a fundamental supernode
std::vector<bool> is_sn(n_, false);
std::vector<HighsBool> is_sn(n_, false);

std::vector<Int> prev_nonz(n_, -1);

Expand Down
2 changes: 1 addition & 1 deletion highs/ipm/hipo/factorhighs/FactorHighs_c_api.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef FACTOR_HIGHS_C_API_H
#define FACTOR_HIGHS_C_API_H

#include "util/HighsInt.h"
#include "util/HighsType.h"

/* C API to HiPO linear solver
It is meant to be used outside of HiGHS as a standalone linear solver.
Expand Down
5 changes: 2 additions & 3 deletions highs/ipm/hipo/ipm/FactorHighsSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ Int FactorHighsSolver::chooseOrdering(const std::vector<Int>& rows,

const Int k = orderings_to_try.size();

// vector<bool> is not thread-safe
std::vector<char> failure(k, 0);
std::vector<HighsBool> failure(k, false);

if (nla == "NE") {
if (ptr.back() >= kkt_.NE_nz_limit.load(std::memory_order_relaxed)) {
Expand Down Expand Up @@ -647,4 +646,4 @@ void FactorHighsSolver::getReg(std::vector<double>& reg) {
FH_.getRegularisation(reg.data());
}

} // namespace hipo
} // namespace hipo
2 changes: 1 addition & 1 deletion highs/ipm/hipo/ipm/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Int Model::init(const HighsLp& lp, const HighsHessian& Q) {
void Model::nzBounds() {
// compute lower and upper bounds for the number of nonzeros in normal
// equations.
std::vector<bool> mark(m_, false);
std::vector<HighsBool> mark(m_, false);
NE_nz_lb_ = A_.num_row_;
NE_nz_ub_ = A_.num_row_;
for (Int col = 0; col < A_.num_col_; ++col) {
Expand Down
2 changes: 1 addition & 1 deletion highs/ipm/hipo/ipm/UpLookingSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void UpLookingSolver::factor(const std::vector<Int>& ptr,
// A must be upper triangular.
// L is computed as lower triangular. The diagonal of L is used to store D^-1.

std::vector<bool> mark(n_, false);
std::vector<HighsBool> mark(n_, false);
std::vector<Int> stack(n_);
Int top = 0;
std::vector<Int> revpattern(n_);
Expand Down
2 changes: 1 addition & 1 deletion highs/ipm/ipx/ipx_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <stdint.h>

#include "util/HighsInt.h"
#include "util/HighsType.h"
typedef HighsInt ipxint;

#endif /* IPX_CONFIG_H_ */
2 changes: 1 addition & 1 deletion highs/ipm/ipx/lu_factorization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static SparseMatrix PermutedMatrix(const Int* Bbegin, const Int* Bend,
const std::vector<Int>& dependent_cols) {
Int dim = rowperm.size();
std::vector<Int> permuted_row = InversePerm(rowperm);
std::vector<bool> dependent(dim, false);
std::vector<HighsBool> dependent(dim, false);
for (Int k : dependent_cols)
dependent[k] = true;

Expand Down
4 changes: 2 additions & 2 deletions highs/ipm/ipx/maxvolume.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct Maxvolume::Slice {
lhs(m), row(n+m), work(m) {}
Vector colscale;
Vector invscale_basic;
std::vector<bool> tblrow_used;
std::vector<HighsBool> tblrow_used;
Vector colweights;
IndexedVector lhs, row;
Vector work;
Expand Down Expand Up @@ -209,7 +209,7 @@ Int Maxvolume::Driver(Basis& basis, Slice& slice) {

Vector& colscale = slice.colscale;
Vector& invscale_basic = slice.invscale_basic;
const std::vector<bool>& tblrow_used = slice.tblrow_used;
const std::vector<HighsBool>& tblrow_used = slice.tblrow_used;
Vector& colweights = slice.colweights;
IndexedVector& lhs = slice.lhs;
IndexedVector& row = slice.row;
Expand Down
2 changes: 1 addition & 1 deletion highs/lp_data/HConst.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <limits>
#include <string>

#include "util/HighsInt.h"
#include "util/HighsType.h"

const std::string kHighsCopyrightStatement =
"Copyright (c) 2026 under MIT licence terms";
Expand Down
2 changes: 1 addition & 1 deletion highs/lp_data/HStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ struct HighsProfiling {
HighsInt num_profiling_clock_ = -1;
std::vector<std::string> name;
// These vectors are over threads
std::vector<uint8_t> submip;
std::vector<HighsBool> submip;
std::vector<HighsProfilingRecord> record;
std::vector<HighsProfilingRecord> submip_record;
bool initialized = false;
Expand Down
2 changes: 1 addition & 1 deletion highs/lp_data/Highs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2686,7 +2686,7 @@ HighsStatus Highs::setSolution(const HighsInt num_entries,
if (model_.lp_.num_col_ == 0) return return_status;
// Warn about duplicates in index
HighsInt num_duplicates = 0;
std::vector<bool> is_set;
std::vector<HighsBool> is_set;
is_set.assign(model_.lp_.num_col_, false);
const HighsInt to_ix = packed ? num_entries : model_.lp_.num_col_;
for (HighsInt iX = 0; iX < to_ix; iX++) {
Expand Down
2 changes: 1 addition & 1 deletion highs/lp_data/HighsCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ HighsStatus HighsCallbackInput::setSolution(HighsInt num_entries,

HighsStatus return_status = HighsStatus::kOk;
HighsInt num_duplicates = 0;
std::vector<bool> is_set(lp.num_col_, false);
std::vector<HighsBool> is_set(lp.num_col_, false);

for (HighsInt iX = 0; iX < num_entries; iX++) {
HighsInt iCol = index[iX];
Expand Down
2 changes: 1 addition & 1 deletion highs/lp_data/HighsCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ struct HighsCallback {
HighsCCallbackType c_callback = nullptr;
void* user_callback_data = nullptr;
Highs* highs = nullptr;
std::vector<bool> active;
std::vector<HighsBool> active;
HighsCallbackOutput data_out;
HighsCallbackInput data_in;
bool callbackActive(const int callback_type);
Expand Down
2 changes: 1 addition & 1 deletion highs/lp_data/HighsCallbackStruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#ifndef LP_DATA_HIGHSCALLBACKSTRUCT_H_
#define LP_DATA_HIGHSCALLBACKSTRUCT_H_

#include "util/HighsInt.h"
#include "util/HighsType.h"

#ifdef __cplusplus
extern "C" {
Expand Down
18 changes: 9 additions & 9 deletions highs/lp_data/HighsInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ HighsStatus Highs::getRangingInterface() {

HighsStatus Highs::getIisInterfaceReturn(
const HighsStatus return_status, const HighsOptions& original_options,
const std::vector<bool>& original_callback_active) {
const std::vector<HighsBool>& original_callback_active) {
// Restore options and callbacks
this->options_ = original_options;
for (int i = kCallbackMin; i <= kCallbackMax; i++) {
Expand Down Expand Up @@ -1979,7 +1979,7 @@ HighsStatus Highs::getIisInterface() {
HighsOptions original_options = this->options_;
// Save original active callbacks and disable all except for
// kCallbackLogging and kCallbackSimplexInterrupt
std::vector<bool> original_callback_active = callback_.active;
std::vector<HighsBool> original_callback_active = callback_.active;
for (int i = kCallbackMin; i <= kCallbackMax; i++) {
if (i != kCallbackLogging && i != kCallbackSimplexInterrupt &&
callback_.active[i])
Expand Down Expand Up @@ -2265,8 +2265,8 @@ HighsStatus Highs::elasticityFilter(const double global_lower_penalty,
// bound_of_row_of_ecol_is_lower so that the results can be interpreted
std::vector<HighsInt> col_of_ecol;
std::vector<HighsInt> row_of_ecol;
std::vector<bool> bound_of_row_of_ecol_is_lower;
std::vector<bool> bound_of_col_of_ecol_is_lower;
std::vector<HighsBool> bound_of_row_of_ecol_is_lower;
std::vector<HighsBool> bound_of_col_of_ecol_is_lower;
std::vector<double> erow_lower;
std::vector<double> erow_upper;
std::vector<HighsInt> erow_start;
Expand Down Expand Up @@ -2774,7 +2774,7 @@ HighsStatus Highs::elasticityFilter(const double global_lower_penalty,
in_row_index[iis.row_index_[iX]] = iX;

// Determine the columns with nonzeros in the row subset
std::vector<bool> nonzero_in_row_index(original_num_col, false);
std::vector<HighsBool> nonzero_in_row_index(original_num_col, false);
if (lp.a_matrix_.isColwise()) {
for (HighsInt iCol = 0; iCol < original_num_col; iCol++) {
for (HighsInt iEl = lp.a_matrix_.start_[iCol];
Expand Down Expand Up @@ -4486,8 +4486,8 @@ void Highs::reportProfiling() const {
}
const double num_threads_used = used_thread.size();
std::stringstream ss;
std::vector<bool> mip_used_sub_solver(kToSubSolver, false);
std::vector<bool> submip_used_sub_solver(kToSubSolver, false);
std::vector<HighsBool> mip_used_sub_solver(kToSubSolver, false);
std::vector<HighsBool> submip_used_sub_solver(kToSubSolver, false);
const HighsInt to_k = max_sumip_time > 0 ? 2 : 1;
const std::vector<std::string>& name = this->profiling_->name;
double sum_sum_mip_sub_solve_time = 0;
Expand All @@ -4510,7 +4510,7 @@ void Highs::reportProfiling() const {
if (ideal_time <= 0) continue;
const std::vector<HighsProfilingRecord>& record =
k == 0 ? this->profiling_->record : this->profiling_->submip_record;
std::vector<bool>& used_sub_solver =
std::vector<HighsBool>& used_sub_solver =
k == 0 ? mip_used_sub_solver : submip_used_sub_solver;
const std::vector<HighsInt>& num_call = record[thread_num].num_call;
const std::vector<double>& run_time = record[thread_num].run_time;
Expand Down Expand Up @@ -4580,7 +4580,7 @@ void Highs::reportProfiling() const {
}
highsLogUser(options_.log_options, HighsLogType::kInfo, "%s\n",
ss.str().c_str());
std::vector<bool>& used_sub_solver =
std::vector<HighsBool>& used_sub_solver =
k == 0 ? mip_used_sub_solver : submip_used_sub_solver;
const std::vector<HighsProfilingRecord>& record =
k == 0 ? this->profiling_->record : this->profiling_->submip_record;
Expand Down
4 changes: 2 additions & 2 deletions highs/mip/HighsCliqueTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class HighsCliqueTable {
std::vector<Substitution> substitutions;
std::vector<HighsInt> deletedrows;
std::vector<std::pair<HighsInt, CliqueVar>> cliqueextensions;
std::vector<uint8_t> iscandidate;
std::vector<uint8_t> colDeleted;
std::vector<HighsBool> iscandidate;
std::vector<HighsBool> colDeleted;
std::vector<uint32_t> cliquehits;
std::vector<HighsInt> cliquehitinds;

Expand Down
2 changes: 1 addition & 1 deletion highs/mip/HighsConflictPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <vector>

#include "mip/HighsDomain.h"
#include "util/HighsInt.h"
#include "util/HighsType.h"

class HighsConflictPool {
private:
Expand Down
Loading
Loading