Replace get_arguments().at(x) with get_argument(x)
This came up while debugging memory corruption in the ngraph-tf tests: plaidml_ops_replicate was holding onto a reference to a temporary that was destroyed while the reference was still live. Replacing that code with a call to get_argument() eliminated the temporary and fixed the issue. And in general, there's no reason to be allocating temporary vectors when we're pulling out a single argument, so this change replaces the other sequences of get_arguments().at(), too.
Showing
Please
register
or
sign in
to comment