Skip to main content

hipMemCreate

Function hipMemCreate 

Source
pub unsafe extern "C" fn hipMemCreate(
    handle: *mut hipMemGenericAllocationHandle_t,
    size: usize,
    prop: *const hipMemAllocationProp,
    flags: c_ulonglong,
) -> hipError_t
Expand description

@brief Creates a memory handle for the allocation described by the properties and given size

@param [out] handle - value of the returned handle. @param [in] size - size of the allocation. @param [in] prop - properties of the allocation. @param [in] flags - currently unused, must be zero. @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported

This API creates a memory allocation on the target device specified through the prop structure. The prop allocation type must be specified as either #hipMemAllocationTypePinned or #hipMemAllocationTypeUncached. The prop location type must be specified as #hipMemLocationTypeDevice or #hipMemLocationTypeHost. Any other value results in #hipErrorInvalidValue.

@note This API is implemented on Linux and is under development on Microsoft Windows.