| 1229 | |
| 1230 | |
| 1231 | hipError_t hipMallocArray(hipArray_t* array, const hipChannelFormatDesc* desc, size_t width, |
| 1232 | size_t height, unsigned int flags) { |
| 1233 | HIP_INIT_API(hipMallocArray, array, desc, width, height, flags); |
| 1234 | if (array == nullptr || desc == nullptr) { |
| 1235 | return hipErrorInvalidValue; |
| 1236 | } |
| 1237 | CHECK_STREAM_CAPTURE_SUPPORTED(); |
| 1238 | HIP_ARRAY3D_DESCRIPTOR allocateArray = {width, |
| 1239 | height, |
| 1240 | 0, /* Depth */ |
| 1241 | hip::getArrayFormat(*desc), |
| 1242 | hip::getNumChannels(*desc), |
| 1243 | flags}; |
| 1244 | if (!hip::CheckArrayFormat(*desc)) { |
| 1245 | return hipErrorInvalidValue; |
| 1246 | } |
| 1247 | HIP_RETURN(ihipArrayCreate(array, &allocateArray, 0 /* numMipLevels */)); |
| 1248 | } |
| 1249 | |
| 1250 | hipError_t hipArray3DCreate(hipArray_t* array, const HIP_ARRAY3D_DESCRIPTOR* pAllocateArray) { |
| 1251 | HIP_INIT_API(hipArray3DCreate, array, pAllocateArray); |
nothing calls this directly
no test coverage detected