@@ -82,14 +82,7 @@ class AllreduceHalvingDoubling : public Algorithm {
8282 sendOffsets_(steps_),
8383 recvOffsets_(steps_),
8484 sendCounts_(steps_, 0 ),
85- recvCounts_(steps_, 0 ),
86- sendCountToLargerBlock_(0 ),
87- offsetToMyBinaryBlock_(0 ),
88- myBinaryBlockSize_(0 ),
89- stepsWithinBlock_(0 ),
90- rankInBinaryBlock_(0 ),
91- nextSmallerBlockSize_(0 ),
92- nextLargerBlockSize_(0 ) {
85+ recvCounts_(steps_, 0 ) {
9386 if (count_ == 0 || this ->contextSize_ == 1 ) {
9487 return ;
9588 }
@@ -222,7 +215,7 @@ class AllreduceHalvingDoubling : public Algorithm {
222215 }
223216 }
224217
225- void run () {
218+ void run () override {
226219 if (count_ == 0 ) {
227220 return ;
228221 }
@@ -394,7 +387,7 @@ class AllreduceHalvingDoubling : public Algorithm {
394387
395388 std::vector<size_t > sendCounts_;
396389 std::vector<size_t > recvCounts_;
397- size_t sendCountToLargerBlock_;
390+ size_t sendCountToLargerBlock_{ 0 } ;
398391
399392 int dummy_;
400393 std::vector<std::unique_ptr<transport::Buffer>> sendNotificationBufs_;
@@ -404,12 +397,12 @@ class AllreduceHalvingDoubling : public Algorithm {
404397 // binary blocks and keep track of which block each process is in, as well as
405398 // the adjoining larger and smaller blocks (with which communication will be
406399 // required)
407- uint32_t offsetToMyBinaryBlock_;
408- uint32_t myBinaryBlockSize_;
409- uint32_t stepsWithinBlock_;
410- uint32_t rankInBinaryBlock_;
411- uint32_t nextSmallerBlockSize_;
412- uint32_t nextLargerBlockSize_;
400+ uint32_t offsetToMyBinaryBlock_{ 0 } ;
401+ uint32_t myBinaryBlockSize_{ 0 } ;
402+ uint32_t stepsWithinBlock_{ 0 } ;
403+ uint32_t rankInBinaryBlock_{ 0 } ;
404+ uint32_t nextSmallerBlockSize_{ 0 } ;
405+ uint32_t nextLargerBlockSize_{ 0 } ;
413406
414407 int slotOffset_;
415408};
0 commit comments