Benchmark create+copy a tensor, with an allocated buffer.
| 1477 | |
| 1478 | // Benchmark create+copy a tensor, with an allocated buffer. |
| 1479 | void BM_CreateAndCopyCtrWithBuf(int iters) { |
| 1480 | TensorShape shape({10, 20}); |
| 1481 | Allocator* allocator = cpu_allocator(); |
| 1482 | while (--iters) { |
| 1483 | Tensor a(allocator, DT_FLOAT, shape); |
| 1484 | Tensor b(a); |
| 1485 | } |
| 1486 | } |
| 1487 | BENCHMARK(BM_CreateAndCopyCtrWithBuf); |
| 1488 | |
| 1489 | // Benchmark create+move a tensor, with an allocated buffer. |
nothing calls this directly
no test coverage detected