Skip to content

Commit

Permalink
Fixes #647: Added an implicit conversion operator from `memory::mappe…
Browse files Browse the repository at this point in the history
…d::span_pair_t<T>` to a pair of `region_t`'s (i.e. with type erasure, as opposed to casting into a pair of `span<T>`'s
  • Loading branch information
eyalroz committed Apr 29, 2024
1 parent 137f0e6 commit f80ff5f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cuda/api/memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ struct span_pair_t {
span<T> host_side, device_side;

constexpr operator ::std::pair<span<T>, span<T>>() const { return { host_side, device_side }; }
constexpr operator ::std::pair<region_t, region_t>() const { return { host_side, device_side }; }
};

/**
Expand Down

0 comments on commit f80ff5f

Please sign in to comment.