Add OpVectorExtractDynamic and OpVectorInsertDynamic

This commit is contained in:
ReinUsesLisp 2019-09-09 15:41:53 -03:00
parent 60a856d266
commit 4a0c6e03e1
2 changed files with 21 additions and 0 deletions

View file

@ -285,6 +285,12 @@ public:
return OpAccessChain(result_type, base, {indexes...});
}
/// Extract a single, dynamically selected, component of a vector.
Id OpVectorExtractDynamic(Id result_type, Id vector, Id index);
/// Make a copy of a vector, with a single, variably selected, component modified.
Id OpVectorInsertDynamic(Id result_type, Id vector, Id component, Id index);
/// Make a copy of a composite object, while modifying one part of it.
Id OpCompositeInsert(Id result_type, Id object, Id composite,
const std::vector<Literal>& indexes = {});