Add OpAny and OpAll

This commit is contained in:
ReinUsesLisp 2019-09-09 16:46:36 -03:00
parent 4a0c6e03e1
commit ae7c664016
2 changed files with 8 additions and 0 deletions

View file

@ -346,6 +346,12 @@ public:
// Logical // Logical
/// Result is true if any component of Vector is true, otherwise result is false.
Id OpAny(Id result_type, Id vector);
/// Result is true if all components of Vector are true, otherwise result is false.
Id OpAll(Id result_type, Id vector);
/// Result is true if x is an IEEE NaN, otherwise result is false. /// Result is true if x is an IEEE NaN, otherwise result is false.
Id OpIsNan(Id result_type, Id operand); Id OpIsNan(Id result_type, Id operand);

View file

@ -35,6 +35,8 @@ namespace Sirit {
return AddCode(std::move(op)); \ return AddCode(std::move(op)); \
} }
DEFINE_UNARY(OpAny, spv::Op::OpAny);
DEFINE_UNARY(OpAll, spv::Op::OpAll);
DEFINE_UNARY(OpIsNan, spv::Op::OpIsNan) DEFINE_UNARY(OpIsNan, spv::Op::OpIsNan)
DEFINE_UNARY(OpIsInf, spv::Op::OpIsInf) DEFINE_UNARY(OpIsInf, spv::Op::OpIsInf)
DEFINE_BINARY(OpLogicalEqual, spv::Op::OpLogicalEqual) DEFINE_BINARY(OpLogicalEqual, spv::Op::OpLogicalEqual)