Skip to content

Commit

Permalink
Document context gotcha.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Dec 19, 2019
1 parent 43894e1 commit 1718b79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/context.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ the system cleans up the resources allocated to it.
When you are done using the context, call [`unsafe_destroy!`](@ref) to mark it for deletion,
or use do-block syntax with this constructor.
!!! warning
Contexts are unique, and should be compared using `===` and not `isequal` or `==`: With
primary device contexts, identical handles might be returned after resetting the context
(device) and all associated resources.
"""
mutable struct CuContext
handle::CUcontext
Expand Down

0 comments on commit 1718b79

Please sign in to comment.