| 492 | } |
| 493 | |
| 494 | int64_t TFE_TensorHandleNumElements(TFE_TensorHandle* h, TF_Status* status) { |
| 495 | if (h == nullptr || h->handle == nullptr) { |
| 496 | status->status = tensorflow::errors::InvalidArgument( |
| 497 | "The passed in handle is a nullptr"); |
| 498 | return -1; |
| 499 | } |
| 500 | tensorflow::int64 result; |
| 501 | status->status = h->handle->NumElements(&result); |
| 502 | return result; |
| 503 | } |
| 504 | |
| 505 | int64_t TFE_TensorHandleDim(TFE_TensorHandle* h, int dim_index, |
| 506 | TF_Status* status) { |
no test coverage detected