def element_ns

stelliferous@0.0.2.0 · kernel_cost.bend:8

import stelliferous@0.0.2.0/kernel_cost.bend as KernelCost
import Base

8# One element's cost. Bytes price loading, storing and the loop that moves
9# them, as the copies that measured copy_byte_ns do; operations are the other
10# scalar work, counted from source.
11def element_ns(+bytes: F32,+operations: F32,config: Configuration) -> F32:
12  Configuration{mac_ns,byte_ns,operation_ns,grain,wake} = config
13  (bytes * byte_ns + operations * operation_ns : F32)

Uses (4)

Used by (3)