Skip to content

Commit

Permalink
Fix macos builds
Browse files Browse the repository at this point in the history
  • Loading branch information
robomics committed Sep 28, 2023
1 parent 12ab184 commit 0980c64
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/libhictk/balancing/include/hictk/balancing/ice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,18 @@ class ICE {
static void min_count_filtering(nonstd::span<double> biases, std::size_t min_count,
nonstd::span<const double> marg);

static void mad_max_filtering(nonstd::span<const std::size_t> chrom_offsets,
static void mad_max_filtering(nonstd::span<const std::uint64_t> chrom_offsets,
nonstd::span<double> biases, nonstd::span<double> marg,
double mad_max);

template <typename MatrixT>
static void initialize_biases(const MatrixT& matrix, nonstd::span<double> biases,
nonstd::span<const std::size_t> chrom_bin_offsets,
nonstd::span<const std::uint64_t> chrom_bin_offsets,
std::size_t min_nnz, std::size_t min_count, double mad_max,
BS::thread_pool* tpool);

[[nodiscard]] static std::vector<double> compute_weights_from_chromosome_sizes(
const BinTable& bins, nonstd::span<std::size_t> chrom_bin_offsets);
const BinTable& bins, nonstd::span<std::uint64_t> chrom_bin_offsets);
};

} // namespace hictk::balancing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ inline void ICE::min_count_filtering(nonstd::span<double> biases, std::size_t mi
}
}

inline void ICE::mad_max_filtering(nonstd::span<const std::size_t> chrom_offsets,
inline void ICE::mad_max_filtering(nonstd::span<const std::uint64_t> chrom_offsets,
nonstd::span<double> biases, nonstd::span<double> marg,
double mad_max) {
auto median = [](auto v) {
Expand Down Expand Up @@ -601,7 +601,7 @@ inline double ICE::compute_ssq_nzmarg(nonstd::span<const double> marg, double av

template <typename MatrixT>
inline void ICE::initialize_biases(const MatrixT& matrix, nonstd::span<double> biases,
nonstd::span<const std::size_t> chrom_bin_offsets,
nonstd::span<const std::uint64_t> chrom_bin_offsets,
std::size_t min_nnz, std::size_t min_count, double mad_max,
BS::thread_pool* tpool) {
if (min_nnz == 0 && min_count == 0 && mad_max == 0) {
Expand Down Expand Up @@ -631,7 +631,7 @@ inline void ICE::initialize_biases(const MatrixT& matrix, nonstd::span<double> b
}

inline std::vector<double> ICE::compute_weights_from_chromosome_sizes(
const BinTable& bins, nonstd::span<std::size_t> chrom_bin_offsets) {
const BinTable& bins, nonstd::span<std::uint64_t> chrom_bin_offsets) {
std::vector<double> weights(bins.size());
for (std::uint32_t i = 1; i < chrom_bin_offsets.size(); ++i) {
const auto& chrom = bins.chromosomes().at(i - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ constexpr std::size_t MargsVector::compute_number_of_mutexes(std::size_t size) n
}

template <typename I, typename>
constexpr I MargsVector::next_pow2(I n) noexcept {
inline I MargsVector::next_pow2(I n) noexcept {
using ull = unsigned long long;
if constexpr (std::is_signed_v<I>) {
assert(n >= 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class MargsVector {
private:
static constexpr std::size_t compute_number_of_mutexes(std::size_t size) noexcept;
template <typename I, typename = std::enable_if_t<std::is_integral_v<I>>>
[[nodiscard]] static constexpr I next_pow2(I n) noexcept;
[[nodiscard]] static I next_pow2(I n) noexcept;
[[nodiscard]] std::size_t get_mutex_idx(std::size_t i) const noexcept;
};

Expand Down

0 comments on commit 0980c64

Please sign in to comment.