Skip to content

Commit

Permalink
Fixes #659: The create_stream() and create_event() methods of `co…
Browse files Browse the repository at this point in the history
…ntext_t` are now `const`

Also, an indentation tweak.
  • Loading branch information
Eyal Rozenberg authored and Eyal Rozenberg committed Jul 9, 2024
1 parent 20e0514 commit 86fefd5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/cuda/api/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,14 @@ class context_t {
/// regarding the parameters
stream_t create_stream(
bool will_synchronize_with_default_stream,
stream::priority_t priority = cuda::stream::default_priority);
stream::priority_t priority = cuda::stream::default_priority) const;

/// Create a new event within this context; see @ref cuda::event::create() for details
/// regarding the parameters
event_t create_event(
bool uses_blocking_sync = event::sync_by_busy_waiting, // Yes, that's the runtime default
bool records_timing = event::do_record_timings,
bool interprocess = event::not_interprocess);
bool interprocess = event::not_interprocess) const;

/// Create a new module of kernels and global memory regions within this context;
/// see also @ref cuda::module::create()
Expand Down
6 changes: 3 additions & 3 deletions src/cuda/api/multi_wrapper_impls/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,16 @@ inline device_t context_t::device() const
}

inline stream_t context_t::create_stream(
bool will_synchronize_with_default_stream,
stream::priority_t priority)
bool will_synchronize_with_default_stream,
stream::priority_t priority) const
{
return stream::detail_::create(device_id_, handle_, will_synchronize_with_default_stream, priority);
}

inline event_t context_t::create_event(
bool uses_blocking_sync,
bool records_timing,
bool interprocess)
bool interprocess) const
{
return cuda::event::detail_::create(
device_id_, handle_, do_not_hold_primary_context_refcount_unit,
Expand Down

0 comments on commit 86fefd5

Please sign in to comment.