Src/GPUPerfAPIHSA/GPUPerfAPIHSA.cpp
// Compare the current context with the specified hwInfo
Compare the current context with the specified hwInfo
Compare the current context with the specified hwInfo
GPA_Status GPA_IMP_CompareHWInfo(void* pContext, GPA_HWInfo* pHwInfo)
{
    assert(nullptr != pHwInfo);
    if (nullptr == pHwInfo)
    {
        GPA_LogError("Parameter 'pHwInfo' is NULL.");
        return GPA_STATUS_ERROR_NULL_POINTER;
    }
    GPA_HWInfo curInfo;
    GPA_Status status = GPA_IMP_GetHWInfo(pContext, &curInfo);
    if (GPA_STATUS_OK == status)
    {
        status = CompareHwInfo(pHwInfo, &curInfo);
    }
    if (GPA_STATUS_OK != status)
    {
        GPA_LogError("Available device is not supported.");
    }
    return status;
}
GPA_Status GPA_IMP_CompareHWInfo ( void * pContext , GPA_HWInfo * pHwInfo ) { assert ( nullptr != pHwInfo ) ; if ( nullptr == pHwInfo ) { GPA_LogError ( " " ) ; return GPA_STATUS_ERROR_NULL_POINTER ; } GPA_HWInfo curInfo ; GPA_Status status = GPA_IMP_GetHWInfo ( pContext , & curInfo ) ; if ( GPA_STATUS_OK == status ) { status = CompareHwInfo ( pHwInfo , & curInfo ) ; } if ( GPA_STATUS_OK != status ) { GPA_LogError ( " " ) ; } return status ; }
Compare the current context with the specified hwInfo
Compare the current context with the specified hwInfo
// Get hwInfo of the current context