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

Function hipMallocMipmappedArray

hipamd/src/hip_memory.cpp:4329–4347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4327}
4328
4329hipError_t hipMallocMipmappedArray(hipMipmappedArray_t* mipmappedArray,
4330 const hipChannelFormatDesc* desc, hipExtent extent,
4331 unsigned int numLevels, unsigned int flags) {
4332 HIP_INIT_API(hipMallocMipmappedArray, mipmappedArray, desc, extent, numLevels, flags);
4333 if (mipmappedArray == nullptr || desc == nullptr) {
4334 return hipErrorInvalidValue;
4335 }
4336 CHECK_STREAM_CAPTURE_SUPPORTED();
4337 HIP_ARRAY3D_DESCRIPTOR allocateArray = {extent.width,
4338 extent.height,
4339 extent.depth,
4340 hip::getArrayFormat(*desc),
4341 hip::getNumChannels(*desc),
4342 flags};
4343 if (!hip::CheckArrayFormat(*desc)) {
4344 return hipErrorInvalidValue;
4345 }
4346 HIP_RETURN(ihipMipmapArrayCreate(mipmappedArray, &allocateArray, numLevels));
4347}
4348
4349hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray) {
4350 HIP_INIT_API(hipFreeMipmappedArray, mipmappedArray);

Callers

nothing calls this directly

Calls 4

getArrayFormatFunction · 0.85
getNumChannelsFunction · 0.85
CheckArrayFormatFunction · 0.85
ihipMipmapArrayCreateFunction · 0.85

Tested by

no test coverage detected