@@ -22,7 +22,7 @@ void* ADL_API_CALL ADL_Main_Memory_Alloc(int iSize)
22
22
23
23
wrap_adl_handle * wrap_adl_create ()
24
24
{
25
- wrap_adl_handle *adlh = NULL ;
25
+ wrap_adl_handle *adlh = nullptr ;
26
26
27
27
#if defined(_WIN32)
28
28
/* Windows */
@@ -36,7 +36,7 @@ wrap_adl_handle * wrap_adl_create()
36
36
#else
37
37
#define libatiadlxx " "
38
38
#warning "Unrecognized platform: need ADL DLL path for this platform..."
39
- return NULL ;
39
+ return nullptr ;
40
40
#endif
41
41
42
42
#ifdef _WIN32
@@ -47,8 +47,8 @@ return NULL;
47
47
#endif
48
48
49
49
void *adl_dll = wrap_dlopen (tmp);
50
- if (adl_dll == NULL )
51
- return NULL ;
50
+ if (adl_dll == nullptr )
51
+ return nullptr ;
52
52
53
53
adlh = (wrap_adl_handle *)calloc (1 , sizeof (wrap_adl_handle));
54
54
@@ -80,31 +80,31 @@ return NULL;
80
80
wrap_dlsym (adlh->adl_dll , " ADL2_Main_Control_Refresh" );
81
81
82
82
83
- if (adlh->adlMainControlCreate == NULL ||
84
- adlh->adlMainControlDestroy == NULL ||
85
- adlh->adlMainControlRefresh == NULL ||
86
- adlh->adlAdapterNumberOfAdapters == NULL ||
87
- adlh->adlAdapterAdapterInfoGet == NULL ||
88
- adlh->adlAdapterAdapterIdGet == NULL ||
89
- adlh->adlOverdrive5TemperatureGet == NULL ||
90
- adlh->adlOverdrive5FanSpeedGet == NULL ||
91
- adlh->adl2MainControlCreate == NULL ||
92
- adlh->adl2MainControlRefresh == NULL ||
93
- adlh->adl2MainControlDestroy == NULL ||
94
- adlh->adl2Overdrive6CurrentPowerGet == NULL
83
+ if (adlh->adlMainControlCreate == nullptr ||
84
+ adlh->adlMainControlDestroy == nullptr ||
85
+ adlh->adlMainControlRefresh == nullptr ||
86
+ adlh->adlAdapterNumberOfAdapters == nullptr ||
87
+ adlh->adlAdapterAdapterInfoGet == nullptr ||
88
+ adlh->adlAdapterAdapterIdGet == nullptr ||
89
+ adlh->adlOverdrive5TemperatureGet == nullptr ||
90
+ adlh->adlOverdrive5FanSpeedGet == nullptr ||
91
+ adlh->adl2MainControlCreate == nullptr ||
92
+ adlh->adl2MainControlRefresh == nullptr ||
93
+ adlh->adl2MainControlDestroy == nullptr ||
94
+ adlh->adl2Overdrive6CurrentPowerGet == nullptr
95
95
) {
96
96
#if 0
97
97
printf("Failed to obtain all required ADL function pointers\n");
98
98
#endif
99
99
wrap_dlclose (adlh->adl_dll );
100
100
free (adlh);
101
- return NULL ;
101
+ return nullptr ;
102
102
}
103
103
104
104
adlh->adlMainControlCreate (ADL_Main_Memory_Alloc, 1 );
105
105
adlh->adlMainControlRefresh ();
106
106
107
- adlh->context = NULL ;
107
+ adlh->context = nullptr ;
108
108
109
109
adlh->adl2MainControlCreate (ADL_Main_Memory_Alloc, 1 , &(adlh->context ));
110
110
adlh->adl2MainControlRefresh (adlh->context );
@@ -174,7 +174,7 @@ return NULL;
174
174
cl::Device cldev = platdevs[j];
175
175
cl_device_topology_amd topology;
176
176
int status = clGetDeviceInfo (cldev (), CL_DEVICE_TOPOLOGY_AMD,
177
- sizeof (cl_device_topology_amd), &topology, NULL );
177
+ sizeof (cl_device_topology_amd), &topology, nullptr );
178
178
if (status == CL_SUCCESS) {
179
179
if (topology.raw .type == CL_DEVICE_TOPOLOGY_TYPE_PCIE_AMD) {
180
180
if (adlh->devs [adlh->phys_logi_device_id [i]].iBusNumber == (int )topology.pcie .bus
0 commit comments