Skip to content

Commit

Permalink
Missing Context.sexp_of_t conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
lukstafi committed Oct 18, 2024
1 parent e2b6dce commit 64e5820
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cudajit.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,11 @@ let no_stream =
module Context = struct
type t = cu_context

let sexp_of_t (ctx : t) =
Sexplib0.Sexp.Atom
("@" ^ Unsigned.UInt64.to_hexstring @@ Unsigned.UInt64.of_string @@ Nativeint.to_string
@@ Ctypes.raw_address_of_ptr @@ Ctypes.to_voidp ctx)

type flag =
| SCHED_AUTO
| SCHED_SPIN
Expand Down
2 changes: 1 addition & 1 deletion cudajit.mli
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ module Context : sig

type flags = flag list [@@deriving sexp]

type t
type t [@@deriving sexp_of]
(** See
{{:https://docs.nvidia.com/cuda/cuda-driver-api/group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9}
CUcontext}. *)
Expand Down

0 comments on commit 64e5820

Please sign in to comment.