| AI Engine-ML v2 Intrinsics User Guide v2025.2

Loading...
Searching...
No Matches
Set-update-extract
Compiler optimizations » Code optimizations

Example:

// Consider only low part
rule(a, b) {
tmp = set_low_part(a);
tmp = update_high(tmp, b)
return extract_low(tmp);
} -> {
return a;
}
// Consider only high part
rule(a, b) {
tmp = set_low_part(a);
tmp = update_high(tmp, b)
return extract_high(tmp);
} -> {
return b;
}

Removes chain of dependency between a set_* and a ext_* expression that refer to the same accumulator component, but the extract operation has finer granularity.

Example:

v16acc64 in = ...;
v32acc64 a = set_v32acc64(0, in); // dmX
v8acc64 out = extract_v8acc64(1, a); // bmlhX
v16acc64
Definition me_chess.h:634
v32acc64
Definition me_chess.h:639
v8acc64
Definition me_chess.h:629
extract_v8acc64
v8acc64 extract_v8acc64(v16acc64 a, int idx)
Definition me_upd_ext.h:3212
set_v32acc64
v32acc64 set_v32acc64(int idx, v8acc64 b)
Definition me_upd_ext.h:4442
v16acc64 in = ...;
v32acc64 a = set_v32acc64(0, in); // dmX
v8acc64 out = extract_v8acc64(1, in); // bmlhX