// Copyright Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #include #include namespace rocRoller { template <> std::shared_ptr> GetGenerator( Register::ValuePtr dst, Register::ValuePtr arg, Expression::Negate const&) { return Component::Get>( getContextFromValues(dst, arg), dst->regType(), dst->variableType().dataType); } Generator NegateGenerator::generate(Register::ValuePtr dest, Register::ValuePtr arg, Expression::Negate const&) { AssertFatal(arg != nullptr); AssertFatal(dest != nullptr); auto zero = Register::Value::Literal(0); zero->setVariableType(dest->variableType()); co_yield generateOp(dest, zero, arg); } }