Allow Tensor trace to be passed to a TensorRef.

This commit is contained in:
Antonio Sanchez
2025-03-25 08:26:23 -07:00
parent 8e32cbf7da
commit 6579e36eb4
2 changed files with 9 additions and 0 deletions

View File

@@ -41,6 +41,9 @@ static void test_simple_lvalue_ref() {
for (int i = 0; i < 6; ++i) {
VERIFY_IS_EQUAL(input(i), -i * 2);
}
TensorRef<const Tensor<int, 1>> ref5(input.trace());
VERIFY_IS_EQUAL(ref5[0], input[0]);
}
static void test_simple_rvalue_ref() {