This commit moves the mad_sat builtin to the CLC library. It also optimizes it for vector types by avoiding scalarization. To help do this it transforms the previous control-flow code into vector select code. This has also been done for the scalar versions for simplicity.
8 lines
168 B
Common Lisp
8 lines
168 B
Common Lisp
#include <clc/clc.h>
|
|
#include <clc/integer/clc_mad_sat.h>
|
|
|
|
#define FUNCTION mad_sat
|
|
#define __CLC_BODY <clc/shared/ternary_def.inc>
|
|
|
|
#include <clc/integer/gentype.inc>
|