Skip to content

Commit c83cdab

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Fix deprecated use of 0/NULL in gloo/cuda_allreduce_ring.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: D56650277 fbshipit-source-id: a9be03583ac815de0b2b2d240adad4d3aa42d47e
1 parent 71868d0 commit c83cdab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gloo/cuda_allreduce_ring.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ class CudaAllreduceRing : public Algorithm {
3232
template <typename U = W>
3333
void init(
3434
typename std::enable_if<std::is_same<U, CudaHostWorkspace<T> >::value,
35-
typename U::Pointer>::type* = 0);
35+
typename U::Pointer>::type* = nullptr);
3636

3737
template <typename U = W>
3838
void init(
3939
typename std::enable_if<std::is_same<U, CudaDeviceWorkspace<T> >::value,
40-
typename U::Pointer>::type* = 0);
40+
typename U::Pointer>::type* = nullptr);
4141

4242
std::vector<CudaDevicePointer<T> > devicePtrs_;
4343
std::vector<CudaStream> streams_;

0 commit comments

Comments
 (0)