Skip to content

Commit 71868d0

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Fix deprecated use of 0/NULL in gloo/cuda_allreduce_halving_doubling.h + 1
Summary: `nullptr` is typesafe. `0` and `NULL` are not. In the future, only `nullptr` will be allowed. This diff helps us embrace the future _now_ in service of enabling `-Wzero-as-null-pointer-constant`. Reviewed By: palmje Differential Revision: D56650289 fbshipit-source-id: 0a320e181876b91bfea27a8400f0a1eb4b827ed9
1 parent 6c70a55 commit 71868d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gloo/cuda_allreduce_halving_doubling.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ class CudaAllreduceHalvingDoubling : public Algorithm {
4242
template <typename U = W>
4343
void init(
4444
typename std::enable_if<std::is_same<U, CudaHostWorkspace<T> >::value,
45-
typename U::Pointer>::type* = 0);
45+
typename U::Pointer>::type* = nullptr);
4646

4747
template <typename U = W>
4848
void init(
4949
typename std::enable_if<std::is_same<U, CudaDeviceWorkspace<T> >::value,
50-
typename U::Pointer>::type* = 0);
50+
typename U::Pointer>::type* = nullptr);
5151

5252
template <typename U = W>
5353
void initReductionsAndBroadcasts(
5454
typename std::enable_if<std::is_same<U, CudaHostWorkspace<T> >::value,
55-
typename U::Pointer>::type* = 0);
55+
typename U::Pointer>::type* = nullptr);
5656

5757
template <typename U = W>
5858
void initReductionsAndBroadcasts(

0 commit comments

Comments
 (0)