hex.add.add_hex_shifted_constant (arity 5)ΒΆ
dst[:dst_n] += const << (4*hex_shift)
const is a constant of size hex[:n_const]
SignatureΒΆ
def add_hex_shifted_constant n_dst, n_const, dst, const, hex_shift @ shifted_constant, end { ... }
Defined in hex/math.fj β lines 61β67 (view on GitHub).
ComplexityΒΆ
Time:
n_const(4@+12) + 5@+2Space:
n_const(2.5@+39) + (dst_n - hex_shift)(1.5@+13) + 4@+29
See the complexity glossary for what @, w, dw, dbit, n mean.
Requires initΒΆ
The following must be initialised before this macro is invoked:
hex.add.init (or hex.init)
SourceΒΆ
Click to view the macro body
def add_hex_shifted_constant n_dst, n_const, dst, const, hex_shift @ shifted_constant, end {
hex.add_shifted n_dst, n_const, dst, shifted_constant, hex_shift
;end
shifted_constant: hex.vec n_const, const
end:
}
Depends onΒΆ
Used byΒΆ
Example usesΒΆ
hex.add.add_hex_shifted_constantinhex/math.fj
β Previous: hex.add.add_hex_shifted_constant/4
Next: hex.add.clear_carry/0 β