Add cuMipmappedArrayCreate

This commit is contained in:
Andrzej Janik 2024-03-07 18:38:30 +00:00
commit b0440bf9ba
2 changed files with 22 additions and 3 deletions

View file

@ -213,6 +213,7 @@ cuda_function_declarations!(
cuLinkComplete, cuLinkComplete,
cuLinkDestroy, cuLinkDestroy,
cuLinkCreate_v2, cuLinkCreate_v2,
cuMipmappedArrayCreate,
] ]
); );
@ -1237,9 +1238,7 @@ mod definitions {
surface::create(pSurfObject, pResDesc) surface::create(pSurfObject, pResDesc)
} }
pub(crate) unsafe fn cuSurfObjectDestroy( pub(crate) unsafe fn cuSurfObjectDestroy(surfObject: hipSurfaceObject_t) -> hipError_t {
surfObject: hipSurfaceObject_t,
) -> hipError_t {
hipDestroySurfaceObject(surfObject) hipDestroySurfaceObject(surfObject)
} }
@ -1647,4 +1646,12 @@ mod definitions {
) -> Result<(), CUresult> { ) -> Result<(), CUresult> {
link::create(numOptions, options, optionValues, stateOut) link::create(numOptions, options, optionValues, stateOut)
} }
pub(crate) unsafe fn cuMipmappedArrayCreate(
pHandle: *mut hipMipmappedArray_t,
pMipmappedArrayDesc: *const HIP_ARRAY3D_DESCRIPTOR,
numMipmapLevels: ::std::os::raw::c_uint,
) -> hipError_t {
array::mipmapped_create(pHandle, pMipmappedArrayDesc, numMipmapLevels)
}
} }

View file

@ -81,3 +81,15 @@ pub(crate) unsafe fn create(
Err(CUresult::CUDA_ERROR_INVALID_VALUE) Err(CUresult::CUDA_ERROR_INVALID_VALUE)
} }
} }
pub(crate) unsafe fn mipmapped_create(
p_handle: *mut hipMipmappedArray_t,
p_mipmapped_array_desc: *const HIP_ARRAY3D_DESCRIPTOR,
num_mipmap_levels: u32,
) -> hipError_t {
hipMipmappedArrayCreate(
p_handle,
p_mipmapped_array_desc.cast_mut(),
num_mipmap_levels,
)
}