| 3843 | } |
| 3844 | |
| 3845 | hipError_t hipArrayGetInfo(hipChannelFormatDesc* desc, hipExtent* extent, unsigned int* flags, |
| 3846 | hipArray_t array) { |
| 3847 | HIP_INIT_API(hipArrayGetInfo, desc, extent, flags, array); |
| 3848 | CHECK_STREAM_CAPTURE_SUPPORTED(); |
| 3849 | |
| 3850 | if (array == nullptr) { |
| 3851 | HIP_RETURN(hipErrorInvalidHandle); |
| 3852 | } |
| 3853 | |
| 3854 | // If all output parameters are nullptr, then no need to proceed further |
| 3855 | if ((desc == nullptr) && (extent == nullptr) && (flags == nullptr)) { |
| 3856 | HIP_RETURN(hipSuccess); |
| 3857 | } |
| 3858 | |
| 3859 | HIP_ARRAY3D_DESCRIPTOR array3DDescriptor; |
| 3860 | hipError_t status = ihipArray3DGetDescriptor(&array3DDescriptor, array); |
| 3861 | |
| 3862 | // Fill each output parameter |
| 3863 | if (status == hipSuccess) { |
| 3864 | if (desc != nullptr) { |
| 3865 | *desc = hip::getChannelFormatDesc(array3DDescriptor.NumChannels, array3DDescriptor.Format); |
| 3866 | } |
| 3867 | |
| 3868 | if (extent != nullptr) { |
| 3869 | extent->width = array3DDescriptor.Width; |
| 3870 | extent->height = array3DDescriptor.Height; |
| 3871 | extent->depth = array3DDescriptor.Depth; |
| 3872 | } |
| 3873 | |
| 3874 | if (flags != nullptr) { |
| 3875 | *flags = array3DDescriptor.Flags; |
| 3876 | } |
| 3877 | } |
| 3878 | |
| 3879 | HIP_RETURN(status); |
| 3880 | } |
| 3881 | |
| 3882 | hipError_t hipArrayGetDescriptor(HIP_ARRAY_DESCRIPTOR* pArrayDescriptor, hipArray_t array) { |
| 3883 | HIP_INIT_API(hipArrayGetDescriptor, pArrayDescriptor, array); |
nothing calls this directly
no test coverage detected