Using the `__builtin_elementwise_(add|sub)_sat` functions allows us to directly optimize to the desired intrinsic, and avoid scalarization for vector types.
8 lines
167 B
Common Lisp
8 lines
167 B
Common Lisp
#include <clc/clc.h>
|
|
#include <clc/integer/clc_sub_sat.h>
|
|
|
|
#define FUNCTION sub_sat
|
|
#define __CLC_BODY <clc/shared/binary_def.inc>
|
|
|
|
#include <clc/integer/gentype.inc>
|