| 478 | } |
| 479 | |
| 480 | mluOpStatus_t mluOpTensorStruct::getTensorDescriptorEx( |
| 481 | mluOpTensorLayout_t *layout, mluOpDataType_t *dtype, int *dimNb, |
| 482 | int *dimSize, int *dimStride) { |
| 483 | PARAM_CHECK("[mluOpGetTensorDescriptorEx]", layout != NULL); |
| 484 | PARAM_CHECK("[mluOpGetTensorDescriptorEx]", dtype != NULL); |
| 485 | PARAM_CHECK("[mluOpGetTensorDescriptorEx]", dimNb != NULL); |
| 486 | PARAM_CHECK("[mluOpGetTensorDescriptorEx]", dimSize != NULL); |
| 487 | PARAM_CHECK("[mluOpGetTensorDescriptorEx]", dimStride != NULL); |
| 488 | |
| 489 | *layout = this->layout; |
| 490 | *dtype = this->dtype; |
| 491 | *dimNb = this->dim; |
| 492 | for (int i = 0; i < *dimNb; ++i) { |
| 493 | dimSize[i] = static_cast<int>(this->dims[i]); |
| 494 | dimStride[i] = static_cast<int>(this->strides[i]); |
| 495 | } |
| 496 | |
| 497 | return MLUOP_STATUS_SUCCESS; |
| 498 | } |
| 499 | |
| 500 | mluOpStatus_t mluOpTensorStruct::getTensorDescriptorEx_v2( |
| 501 | mluOpTensorLayout_t *layout, mluOpDataType_t *dtype, int *dimNb, |
no outgoing calls
no test coverage detected