Skip to content

Commit c2f2a2b

Browse files
committed
Fixes #772: Removed some non-outer-::-qualified uses of std in our code, to avoid conflict with cuda::std
1 parent a85d187 commit c2f2a2b

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/cuda/api/detail/region.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ class base_region_t {
4747
using size_type = size_t;
4848
// No pointer difference type, as the pointers here are void-typed and
4949
// there's no sense in subtracting them except internally
50-
// difference_type = std::ptrdiff_t
50+
// difference_type = ::std::ptrdiff_t
5151

5252
private:
5353
T* start_ = nullptr;
5454
size_type size_in_bytes_ = 0;
5555

56-
// If we were using C++17 or later, we could forget about this and use `std::byte`
56+
// If we were using C++17 or later, we could forget about this and use `::std::byte`
5757
using char_type = typename ::std::conditional<::std::is_const<T>::value, const char *, char *>::type;
5858
public:
5959
constexpr base_region_t() noexcept = default;

src/cuda/api/graph/instance.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ class update_failure : public ::std::runtime_error {
180180
:
181181
parent((what_arg.empty() ? "" : what_arg + ": ") + describe(kind, impermissible_node)),
182182
kind_(kind),
183-
impermissible_node_(std::move(impermissible_node))
183+
impermissible_node_(::std::move(impermissible_node))
184184
{
185185
// TODO: Ensure the kind needs a node handle IFF a node handle has been provided
186186
}
187187

188188
update_failure(update_status_t kind, node_t impermissible_node) noexcept
189-
: update_failure(kind, optional<node_t>(std::move(impermissible_node)), "")
189+
: update_failure(kind, optional<node_t>(::std::move(impermissible_node)), "")
190190
{ }
191191

192192
update_status_t kind() const noexcept { return kind_; }

src/cuda/api/graph/node_builder.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class typed_builder_t<kind_t::child_graph> {
7676
if (not was_set.template_) {
7777
throw detail_::make_unspec_error("child graph", "child graph template");
7878
}
79-
return graph_template.insert.node<kind>(std::move(params_));
79+
return graph_template.insert.node<kind>(::std::move(params_));
8080
}
8181
}; // typed_builder_t<kind_t::child_graph>
8282

@@ -117,7 +117,7 @@ class typed_builder_t<kind_t::record_event> {
117117
if (not was_set.event) {
118118
throw detail_::make_unspec_error("record event", "event");
119119
}
120-
return graph_template.insert.node<kind>(std::move(params_));
120+
return graph_template.insert.node<kind>(::std::move(params_));
121121
}
122122
}; // typed_builder_t<kind_t::record_event>
123123

@@ -156,7 +156,7 @@ class typed_builder_t<kind_t::wait_on_event> {
156156
if (not was_set.event) {
157157
throw detail_::make_unspec_error("wait on event", "event");
158158
}
159-
return graph_template.insert.node<kind>(std::move(params_));
159+
return graph_template.insert.node<kind>(::std::move(params_));
160160
}
161161
}; // typed_builder_t<kind_t::wait_event>
162162

@@ -403,7 +403,7 @@ class typed_builder_t<kind_t::memory_copy> {
403403

404404
template <typename... Ts>
405405
this_type& source(Ts&&... args) {
406-
return do_([&]{ params_.set_source(std::forward<Ts>(args)...); });
406+
return do_([&]{ params_.set_source(::std::forward<Ts>(args)...); });
407407
}
408408
//
409409
// template <typename... Ts>
@@ -413,7 +413,7 @@ class typed_builder_t<kind_t::memory_copy> {
413413

414414
template <typename... Ts>
415415
this_type& destination(Ts&&... args) {
416-
return do_([&]{ params_.set_destination(std::forward<Ts>(args)...); });
416+
return do_([&]{ params_.set_destination(::std::forward<Ts>(args)...); });
417417
}
418418

419419
template <typename... Ts>
@@ -485,7 +485,7 @@ class typed_builder_t<kind_t::memory_set> {
485485
{
486486
static_assert(sizeof(T) <= 4, "Type of value to set is too wide; maximum size is 4");
487487
static_assert(sizeof(T) != 3, "Size of type to set is not a power of 2");
488-
static_assert(std::is_trivially_copy_constructible<T>::value, "Only a trivially-constructible value can be used for memset'ing");
488+
static_assert(::std::is_trivially_copy_constructible<T>::value, "Only a trivially-constructible value can be used for memset'ing");
489489
return do_([&] {
490490
params_.width_in_bytes = sizeof(T);
491491
switch(sizeof(T)) {

src/cuda/api/launch_config_builder.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ class launch_config_builder_t {
575575
/// over all (1D) blocks in the grid
576576
launch_config_builder_t& overall_size(size_t size)
577577
{
578-
static_assert(std::is_same<grid::overall_dimension_t, size_t>::value, "Unexpected type difference");
578+
static_assert(::std::is_same<grid::overall_dimension_t, size_t>::value, "Unexpected type difference");
579579
return overall_dimensions(size, 1, 1);
580580
}
581581

0 commit comments

Comments
 (0)