Initializing the four columns of a Chan–He node #
Main definitions #
Padding.program: a fixed loop writing a four-word pattern to every group.
Main results #
Padding.exec: exact memory and a charged12N+5instruction bound.
References #
This native program and its execution proof are original.
@[reducible, inline]
Packed output base.
Instances For
@[reducible, inline]
Number of four-cell groups.
Instances For
@[reducible, inline]
Padding word for column zero.
Instances For
@[reducible, inline]
Padding word for column one.
Instances For
@[reducible, inline]
Padding word for column two.
Instances For
@[reducible, inline]
Padding word for column three.
Instances For
@[reducible, inline]
Group cursor.
Instances For
@[reducible, inline]
Temporary address.
Instances For
@[reducible, inline]
Constant one.
Instances For
@[reducible, inline]
Constant four.
Instances For
A concrete four-word pattern, addressed by its residue modulo four.
Instances For
theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.Padding.memory_succ (mem : ℕ → ℕ) (dst p₀ p₁ p₂ p₃ k : ℕ) :
memory mem dst p₀ p₁ p₂ p₃ (k + 1) = Function.update
(Function.update
(Function.update (Function.update (memory mem dst p₀ p₁ p₂ p₃ k) (dst + 4 * k) p₀) (dst + 4 * k + 1) p₁)
(dst + 4 * k + 2) p₂)
(dst + 4 * k + 3) p₃
Four distinct stores make one complete group.
Every address, store and increment of a four-word group is charged.
Instances For
Runtime pattern values and length, with fixed code and registers.
Instances For
theorem Cslib.Algorithms.WordRAM.ThreeSum.ChanHe.Padding.exec {w : ℕ} (x : WordRAM.Data 10) (h4 : WordRAM.Fits w 4) (hfit : WordRAM.Fits w (x.regs dst + 4 * x.regs len)) :
Initialize exactly 4N cells from arbitrary old memory.