Skip to main content

func_code_needs_fpu

Function func_code_needs_fpu 

Source
pub fn func_code_needs_fpu(code: u8) -> bool
Expand description

Does a Func cell with this code run on the FPU lane (WITH_FPU)? The float units (add/sub/mul/div/sqrt/ floor, the IEEE compares, int→float, approx-eq) exist only when the engine is built with the FPU, and so does popcount (it rides the FPU’s combinational lane; the FPU-less MUL_FUNC_F answers 0 for it). An image built WITH_FPU(0) has no datapath for any of these and must not be handed such a program. The integer units — div/mod/floor-div/pow and the DSP multiplies — run on every image.