ADLX
ADLX copied to clipboard
Next() is not working
I was planning to get GPUs count.
Created a function:
`int GetGPUsCount() { // Call the function to initialize ADLX if (!InitializeADLX()) { // ADLX initialization failed, return a default value or handle the error return -1; }
// Get GPU list
IADLXGPUListPtr gpus;
ADLX_RESULT res = g_ADLXHelp.GetSystemServices()->GetGPUs(&gpus);
if (ADLX_SUCCEEDED(res))
{
// Iterate through the list to count GPUs
int gpuCount = 0;
while (gpus->Next())
{
gpuCount++;
}
// Clean up ADLX before returning
g_ADLXHelp.Cleanup();
return gpuCount;
}
else
{
// Handle the error, you might want to log or throw an exception
std::cerr << "Failed to get GPU list" << std::endl;
// Clean up ADLX before returning
g_ADLXHelp.Terminate();
return -1;
}
} `
But Next() is not available. What should I use?
Does your system have AMD GPU installed? The GetGPUs will only return the AMD GPU.
Does your system have AMD GPU installed? The GetGPUs will only return the AMD GPU.
I personally don't have AMD GPU but my friend has. I'm developing a plugin for Unreal Engine, it will get all hardware informations from the available GPU Brands. AMD is one of them.
I was going to test it on my friend's PC but Next() function is not available. It's not about if I have AMD GPU or not.
I'm not planning to run on my PC, but it must compile succesfully.