@@ -494,11 +494,11 @@ template <> class DeviceQueues<HIP> {
494
494
delete[] streams[d];
495
495
}
496
496
delete[] streams;
497
- streams = NULL ;
497
+ streams = nullptr ;
498
498
}
499
499
500
500
int NumDevices;
501
- hipStream_t **streams = NULL ;
501
+ hipStream_t **streams = nullptr ;
502
502
};
503
503
504
504
extern int hip_dev_id;
@@ -718,7 +718,7 @@ template <> class MemoryManager<HIP> {
718
718
if (queue_idx == MGARDX_SYNCHRONIZED_QUEUE) {
719
719
DeviceRuntime<HIP>::SyncQueue (queue_idx);
720
720
}
721
- if (ptr == NULL )
721
+ if (ptr == nullptr )
722
722
return ;
723
723
gpuErrchk (hipFree (ptr));
724
724
if (queue_idx == MGARDX_SYNCHRONIZED_QUEUE) {
@@ -803,7 +803,7 @@ template <> class MemoryManager<HIP> {
803
803
if (queue_idx == MGARDX_SYNCHRONIZED_QUEUE) {
804
804
DeviceRuntime<HIP>::SyncQueue (queue_idx);
805
805
}
806
- if (ptr == NULL )
806
+ if (ptr == nullptr )
807
807
return ;
808
808
gpuErrchk (hipFreeHost (ptr));
809
809
if (queue_idx == MGARDX_SYNCHRONIZED_QUEUE) {
@@ -2235,7 +2235,7 @@ template <> class DeviceCollective<HIP> {
2235
2235
SubArray<1 , T, HIP> result,
2236
2236
Array<1 , Byte , HIP> &workspace, int queue_idx) {
2237
2237
Byte *d_temp_storage =
2238
- workspace.hasDeviceAllocation () ? workspace.data () : NULL ;
2238
+ workspace.hasDeviceAllocation () ? workspace.data () : nullptr ;
2239
2239
size_t temp_storage_bytes =
2240
2240
workspace.hasDeviceAllocation () ? workspace.shape (0 ) : 0 ;
2241
2241
hipStream_t stream = DeviceRuntime<HIP>::GetQueue (queue_idx);
@@ -2252,7 +2252,7 @@ template <> class DeviceCollective<HIP> {
2252
2252
AbsMax (SIZE n, SubArray<1 , T, HIP> v, SubArray<1 , T, HIP> result,
2253
2253
Array<1 , Byte , HIP> &workspace, int queue_idx) {
2254
2254
Byte *d_temp_storage =
2255
- workspace.hasDeviceAllocation () ? workspace.data () : NULL ;
2255
+ workspace.hasDeviceAllocation () ? workspace.data () : nullptr ;
2256
2256
size_t temp_storage_bytes =
2257
2257
workspace.hasDeviceAllocation () ? workspace.shape (0 ) : 0 ;
2258
2258
AbsMaxOp absMaxOp;
@@ -2273,7 +2273,7 @@ template <> class DeviceCollective<HIP> {
2273
2273
hipcub::TransformInputIterator<T, SquareOp, T *> transformed_input_iter (
2274
2274
v.data (), squareOp);
2275
2275
Byte *d_temp_storage =
2276
- workspace.hasDeviceAllocation () ? workspace.data () : NULL ;
2276
+ workspace.hasDeviceAllocation () ? workspace.data () : nullptr ;
2277
2277
size_t temp_storage_bytes =
2278
2278
workspace.hasDeviceAllocation () ? workspace.shape (0 ) : 0 ;
2279
2279
hipStream_t stream = DeviceRuntime<HIP>::GetQueue (queue_idx);
@@ -2291,7 +2291,7 @@ template <> class DeviceCollective<HIP> {
2291
2291
ScanSumInclusive (SIZE n, SubArray<1 , T, HIP> v, SubArray<1 , T, HIP> result,
2292
2292
Array<1 , Byte , HIP> &workspace, int queue_idx) {
2293
2293
Byte *d_temp_storage =
2294
- workspace.hasDeviceAllocation () ? workspace.data () : NULL ;
2294
+ workspace.hasDeviceAllocation () ? workspace.data () : nullptr ;
2295
2295
size_t temp_storage_bytes =
2296
2296
workspace.hasDeviceAllocation () ? workspace.shape (0 ) : 0 ;
2297
2297
hipStream_t stream = DeviceRuntime<HIP>::GetQueue (queue_idx);
@@ -2308,7 +2308,7 @@ template <> class DeviceCollective<HIP> {
2308
2308
ScanSumExclusive (SIZE n, SubArray<1 , T, HIP> v, SubArray<1 , T, HIP> result,
2309
2309
Array<1 , Byte , HIP> &workspace, int queue_idx) {
2310
2310
Byte *d_temp_storage =
2311
- workspace.hasDeviceAllocation () ? workspace.data () : NULL ;
2311
+ workspace.hasDeviceAllocation () ? workspace.data () : nullptr ;
2312
2312
size_t temp_storage_bytes =
2313
2313
workspace.hasDeviceAllocation () ? workspace.shape (0 ) : 0 ;
2314
2314
hipStream_t stream = DeviceRuntime<HIP>::GetQueue (queue_idx);
@@ -2325,7 +2325,7 @@ template <> class DeviceCollective<HIP> {
2325
2325
ScanSumExtended (SIZE n, SubArray<1 , T, HIP> v, SubArray<1 , T, HIP> result,
2326
2326
Array<1 , Byte , HIP> &workspace, int queue_idx) {
2327
2327
Byte *d_temp_storage =
2328
- workspace.hasDeviceAllocation () ? workspace.data () : NULL ;
2328
+ workspace.hasDeviceAllocation () ? workspace.data () : nullptr ;
2329
2329
size_t temp_storage_bytes =
2330
2330
workspace.hasDeviceAllocation () ? workspace.shape (0 ) : 0 ;
2331
2331
hipStream_t stream = DeviceRuntime<HIP>::GetQueue (queue_idx);
@@ -2349,7 +2349,7 @@ template <> class DeviceCollective<HIP> {
2349
2349
SubArray<1 , ValueT, HIP> out_values, Array<1 , Byte , HIP> &workspace,
2350
2350
int queue_idx) {
2351
2351
Byte *d_temp_storage =
2352
- workspace.hasDeviceAllocation () ? workspace.data () : NULL ;
2352
+ workspace.hasDeviceAllocation () ? workspace.data () : nullptr ;
2353
2353
size_t temp_storage_bytes =
2354
2354
workspace.hasDeviceAllocation () ? workspace.shape (0 ) : 0 ;
2355
2355
hipStream_t stream = DeviceRuntime<HIP>::GetQueue (queue_idx);
@@ -2366,4 +2366,4 @@ template <> class DeviceCollective<HIP> {
2366
2366
2367
2367
} // namespace mgard_x
2368
2368
2369
- #endif
2369
+ #endif
0 commit comments