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
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ tags. It is named as a gap rather than reconstructed, because a changelog assemb
fact loses exactly the reasoning that makes it worth keeping. Every release from `v0.2.0` on
is written up below, newest first.

## [Unreleased] — targeting 0.4.1

### Changed

- **The allocation readings of `ReducedTensor` are taken only where the runner does not instrument
coverage**, as the other `== 0` readings of the suite are. The `== 0` readings of `getindex` and
`copyto!` and their `> 0` control in `test/reduced_tensor.jl` sit behind
`Base.JLOptions().code_coverage == 0`, because coverage instrumentation allocates on its own
account. Tests only; nothing in the package changes.

## [0.4.0] — 2026-10-30

### Breaking Changes
Expand Down
11 changes: 8 additions & 3 deletions test/reduced_tensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,14 @@ allocations(f::F, a::A, b::B) where {F, A, B} = (f(a, b); @allocated f(a, b))
local gt = neighbourhood_tensor(Xoshiro(1), DT, g, w)
local rt = ReducedTensor(gt, rand(Xoshiro(2), DT, n, 3), rand(Xoshiro(3), DT, n, 2))
local out = Array{DT}(undef, size(rt))
@test allocations((r, o) -> r[2, 1, 7], rt, out) == 0
@test allocations((r, o) -> copyto!(o, r), rt, out) == 0
@test allocations((r, o) -> collect(r), rt, out) > 0

# Coverage instrumentation allocates on its own account, so the readings are taken
# only where the runner does not instrument the code.
if Base.JLOptions().code_coverage == 0
@test allocations((r, o) -> r[2, 1, 7], rt, out) == 0
@test allocations((r, o) -> copyto!(o, r), rt, out) == 0
@test allocations((r, o) -> collect(r), rt, out) > 0
end
end
end

Expand Down
Loading