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
2 changes: 0 additions & 2 deletions compression/int-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ class IntCodec {
const hn::Rebind<int32_t, decltype(df)> di32;
const hn::Rebind<int16_t, decltype(di32)> di16;
const hn::Rebind<int8_t, decltype(di16)> di8;
const hn::Rebind<int8_t, decltype(df)> df8;

const size_t N = hn::Lanes(di8);
const size_t N32 = hn::Lanes(df);
Expand Down Expand Up @@ -387,7 +386,6 @@ class IntCodec {
const hn::Rebind<int32_t, decltype(df)> di32;
const hn::Rebind<int16_t, decltype(di32)> di16;
const hn::Rebind<int8_t, decltype(di16)> di8;
const hn::Rebind<int8_t, decltype(df)> df8;

const size_t N = hn::Lanes(di8);
using VI8 = hn::Vec<decltype(di8)>;
Expand Down
4 changes: 2 additions & 2 deletions util/allocator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ CacheInfo::CacheInfo(const BoundedTopology& topology) {
Allocator::Allocator(const BoundedTopology& topology,
const CacheInfo& cache_info, bool enable_bind)
: line_bytes_(cache_info.LineBytes()),
step_bytes_(cache_info.StepBytes()),
base_page_bytes_(DetectPageSize()),
total_mib_(DetectTotalMiB(base_page_bytes_)) {
quantum_bytes_ = cache_info.StepBytes(); // may overwrite below
Expand Down Expand Up @@ -239,9 +240,8 @@ AlignedPtr<uint8_t[]> Allocator::AllocBytes(size_t bytes) const {
static_cast<uint8_t*>(p),
DeleterFunc([bytes](void* ptr) { HWY_ASSERT(munmap(ptr, bytes) == 0); }));
#elif HWY_OS_WIN
const size_t alignment = HWY_MAX(vector_bytes_, line_bytes_);
return AlignedPtr<uint8_t[]>(
static_cast<uint8_t*>(_aligned_malloc(bytes, alignment)),
static_cast<uint8_t*>(_aligned_malloc(bytes, step_bytes_)),
DeleterFunc([](void* ptr) { _aligned_free(ptr); }));
#else
return AlignedPtr<uint8_t[]>(nullptr, DeleterFunc());
Expand Down
1 change: 1 addition & 0 deletions util/allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ class Allocator {

private:
const size_t line_bytes_;
const size_t step_bytes_;
const size_t base_page_bytes_;
const size_t total_mib_;

Expand Down
Loading