futhark-bindgen 0.2.8

Futhark binding generator
Documentation
1
2
3
4
5
6
7
  let v ctx {new_params} =
    check_use_after_free `context ctx.Context.context_free;
    let ptr = allocate ~finalise:(free' ctx) (ptr void) null in
    let rc = Bindings.{new_fn} ctx.Context.handle ptr {new_call_args} in
    if rc <> 0 then raise (Error (Code rc));
    Context.auto_sync ctx;
    {{ opaque_ptr = ptr; opaque_ctx = ctx }}