 sumRowwise(DeviceVector *d_x, real alpha, const DeviceMatrix &d_A) {
     auto outPtr = MulOutPtr<real>(d_x->d_data, alpha);
 #if 0
-    size_t temp_storage_bytes;
+    size_t temp_storage_bytes = 0;
     cub::DeviceSegmentedReduce::Sum(NULL, temp_storage_bytes,
                                     d_A.d_data, outPtr, d_A.rows,
                                     Linear(d_A.stride, 0), Linear(d_A.stride, d_A.cols),


template<class real> void DeviceMathKernelsType<real>::
min(DeviceScalar *d_min, const DeviceVector &d_x) {
    size_t temp_storage_bytes;
    cub::DeviceReduce::Min(NULL, temp_storage_bytes,
                           d_x.d_data, d_min->d_data, 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__);
