cubecl_hip_sys

Function hipMalloc

Source
pub unsafe extern "C" fn hipMalloc(
    ptr: *mut *mut c_void,
    size: usize,
) -> hipError_t
Expand description

@} / /** @brief Allocate memory on the default accelerator

@param[out] ptr Pointer to the allocated memory @param[in] size Requested memory size

If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.

@return #hipSuccess, #hipErrorOutOfMemory, #hipErrorInvalidValue (bad context, null *ptr)

@see hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray, hipHostFree, hipHostMalloc