Using ADLX in an application
The ADLX SDK provides different versions of the ADLX initialization function to use when you load ADLX into a new application or into an existing application that uses ADL.
Install the ADLX SDK before programming an application with ADLX. Native support is provided for C, and C++.
Build the ADLX binding wrapper when programming in C#, Java, or Python.
To access the ADLX System interface
Program an application to load the ADLX library.
Load the ADLX library.
Initialize ADLX by locating and calling the pointer to the respective function.
Result: Access to the ADLX System interface is provided on a successful Initialization call.
Note: There are different ADLX initialization versions that correspond to a specific function. Program your application to only find one function pointer to call a specific ADLX Initialization function that best suits your requirement.
The ADLX System interface is the gateway to all available ADLX interfaces. These interfaces provide the methods required to access all the features available in the AMD driver. The ADLX Helper code provided with the ADLX SDK simplifies the loading and unloading of ADLX by finding, and then calling the required function pointers whenever ADLX is initialized.
Using ADLX in a new application
You can program a new application to use ADLX to work with the AMD driver. You can load and initialize ADLX in a new application by accessing the ADLXInitialize function.
For C++, C#, Java, and Python – Through the ADLX Helper class Initialize method.
For C – Through ADLX Helper code, ADLXHelper_Initialize function.
Directly – Without the ADLX Helper code, through ADLXInitialize_Fn function pointer.
Using ADLX in an ADL application
An existing application that uses ADL can be programmed to support ADLX without rewriting the entire code. ADLX provides ADLXInitializeWithCallerADL as an initialization function to load and initialize ADLX in an application that already uses ADL. You can load and initialize ADLX in a application that uses ADL by accessing the ADLXInitializeWithCallerADL function:
For C++ – Through the ADLX Helper class, InitializeWithCallerAdl method.
For C – Through the ADLX Helper code, ADLXHelper_InitializeWithCallerAdl function.
Directly – Without the ADLX Helper code, through ADLXInitializeWithCallerAdl_Fn function pointer.
Pass the ADL context and the ADLX_ADL_Main_Memory_Free function (previously passed during ADL initialization) as input parameters into ADLXInitializeWithCallerADL. The IADLMapping interface is provided as output parameter. This interface provides data mapping between ADL and ADLX for a specific entity (GPU, Display or Desktop).