     InDotPtr<real> inPtr(d_x.d_data, d_y.d_data);
     if (addAssignFactor == 0.) {
         auto outPtr = MulOutPtr<real>(d_c->d_data, alpha);
-        size_t temp_storage_bytes;
+        size_t temp_storage_bytes = 0;
         cub::DeviceReduce::Sum(NULL, temp_storage_bytes,
                                inPtr, outPtr, d_x.size, stream_, CUB_DEBUG);
         void *d_temp_storage = devStream_->allocate(temp_storage_bytes, __func__);

    }
    else {
        auto outPtr = AddAssignOutPtr<real>(d_c->d_data, addAssignFactor, alpha);
        size_t temp_storage_bytes;
        cub::DeviceReduce::Sum(NULL, temp_storage_bytes,
                               inPtr, outPtr, d_x.size, stream_, CUB_DEBUG);
        void *d_temp_storage = devStream_->allocate(temp_storage_bytes, __func__);

    int size = std::min(d_A.cols - xOffset, d_A.rows - yOffset);

    auto inPtr = InDiagonalPtr<real>(d_A.d_data, d_A.stride, xOffset, yOffset);
    size_t temp_storage_bytes = 0;
    cub::DeviceReduce::Sum(NULL, temp_storage_bytes,
                           inPtr, d_A.d_data, size, stream_, CUB_DEBUG);
    void *d_temp_storage = devStream_->allocate(temp_storage_bytes, __func__);
