def gf8tab.fill.exp

bend-osdev-gf@0.1.1.0 · tables.bend:19

import bend-osdev-gf@0.1.1.0/tables.bend as Tables
import Base
import bend-osdev-gf@0.1.1.0/gf.bend as G

19# exp[i] for i from i0, n entries, with cur = gen^i0
20def gf8tab.fill.exp(n: Nat, a: Array<U32>, +f: G.Gf8Field, +cur: U32, +i: U32) -> Array<U32>:
21  match n:
22    case 0n:
23      a
24    case 1n+k:
25      gf8tab.fill.exp(k, Array.set(U32, a, i, cur), f, G.Gf8.mul(f, G.Gf8.gen(f), cur), U32.add(i, 1))

Uses (8)

Used by (6)