| 62 | } |
| 63 | |
| 64 | int64_t TensorShape::prefix_elements() const { |
| 65 | if (rank <= 1) { |
| 66 | return 1; |
| 67 | } |
| 68 | |
| 69 | int64_t total = 1; |
| 70 | for (size_t i = 0; i + 1 < rank; ++i) { |
| 71 | total *= dims[i]; |
| 72 | } |
| 73 | return total; |
| 74 | } |
| 75 | |
| 76 | int64_t TensorShape::num_elements() const { |
| 77 | int64_t total = 1; |
no outgoing calls
no test coverage detected