Skip to content

Commit

Permalink
Fix compile error due to missing header (NVIDIA#11257)
Browse files Browse the repository at this point in the history
The recently merged PR (rapidsai/cudf#11137) did not include the `<optional>` header which may cause compile error in some systems (in particular, CUDA 11.7 + gcc-11.2):
```
error: ‘std::optional’ has not been declared
error: ‘optional’ in namespace ‘std’ does not name a template type
```

This PR adds that missing header to fix the compile issue.

Authors:
  - Nghia Truong (https://github.com/ttnghia)

Approvers:
  - Gera Shegalov (https://github.com/gerashegalov)
  - David Wendt (https://github.com/davidwendt)
  - Mike Wilson (https://github.com/hyperbolic2346)

URL: rapidsai/cudf#11257
  • Loading branch information
ttnghia authored Jul 13, 2022
1 parent 62c0ae8 commit 833cadd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions cpp/include/cudf/detail/null_mask.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

#include <algorithm>
#include <iterator>
#include <optional>
#include <vector>

namespace cudf {
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/cudf/detail/reduction_functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

#include <rmm/cuda_stream_view.hpp>

#include <optional>

namespace cudf {
namespace reduction {
/**
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/cudf/reduction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include <rmm/mr/device/per_device_resource.hpp>

#include <optional>

namespace cudf {
/**
* @addtogroup aggregation_reduction
Expand Down
1 change: 1 addition & 0 deletions cpp/src/reductions/simple_segmented.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <thrust/iterator/transform_iterator.h>
#include <thrust/iterator/zip_iterator.h>

#include <optional>
#include <type_traits>

namespace cudf {
Expand Down

0 comments on commit 833cadd

Please sign in to comment.