def quads

stelliferous@0.0.2.0 · tensor_file.bend:61

import stelliferous@0.0.2.0/tensor_file.bend as TensorFile
import Base

61# Four bytes at a time while the bytes are whole words; the values are newest first.
62def quads(bytes: List<&2,U32>,values: List<&2,F32>,+count: U32) -> Words:
63  match bytes:
64    case Con{first,Con{second,Con{third,Con{fourth,rest}}}}:
65      quads(rest,from_bits((first + second * 256 + third * 65536 + fourth * 16777216 : U32)) <> values,(count + 1 : U32))
66    case rest: trickle(rest,Words{values,count,0,1})

Uses (8)

Used by (1)