MCPcopy Create free account
hub / github.com/ROCm/clr / hipMalloc3DArray

Function hipMalloc3DArray

hipamd/src/hip_memory.cpp:1259–1277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1257}
1258
1259hipError_t hipMalloc3DArray(hipArray_t* array, const hipChannelFormatDesc* desc, hipExtent extent,
1260 unsigned int flags) {
1261 HIP_INIT_API(hipMalloc3DArray, array, desc, extent, flags);
1262 if (array == nullptr || desc == nullptr) {
1263 return hipErrorInvalidValue;
1264 }
1265 CHECK_STREAM_CAPTURE_SUPPORTED();
1266 HIP_ARRAY3D_DESCRIPTOR allocateArray = {extent.width,
1267 extent.height,
1268 extent.depth,
1269 hip::getArrayFormat(*desc),
1270 hip::getNumChannels(*desc),
1271 flags};
1272 if (!hip::CheckArrayFormat(*desc)) {
1273 return hipErrorInvalidValue;
1274 }
1275
1276 HIP_RETURN(ihipArrayCreate(array, &allocateArray, 0));
1277}
1278
1279hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr) {
1280 HIP_INIT_API(hipHostGetFlags, flagsPtr, hostPtr);

Callers

nothing calls this directly

Calls 4

getArrayFormatFunction · 0.85
getNumChannelsFunction · 0.85
CheckArrayFormatFunction · 0.85
ihipArrayCreateFunction · 0.85

Tested by

no test coverage detected