Skip to content

Commit

Permalink
Use nullptr in faiss/gpu/StandardGpuResources.cpp (#4232)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #4232

`nullptr` is preferable to `0` or `NULL`. Let's use it everywhere so we can enable `-Wzero-as-null-pointer-constant`.

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Reviewed By: dtolnay

Differential Revision: D70818157

fbshipit-source-id: a46d64b6d80844f5246f7df236eb6ec54ce2886f
  • Loading branch information
r-barnes authored and facebook-github-bot committed Mar 9, 2025
1 parent 3d96ad5 commit 653be59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion faiss/gpu/StandardGpuResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ void StandardGpuResourcesImpl::initializeForDevice(int device) {
raftHandles_.emplace(std::make_pair(device, defaultStream));
#endif

cudaStream_t asyncCopyStream = 0;
cudaStream_t asyncCopyStream = nullptr;
CUDA_VERIFY(
cudaStreamCreateWithFlags(&asyncCopyStream, cudaStreamNonBlocking));

Expand Down

0 comments on commit 653be59

Please sign in to comment.