ggml_backend_sched_eval_callback typedef

ggml_backend_sched_eval_callback = Pointer<NativeFunction<Bool Function(Pointer<ggml_tensor> t, Bool ask, Pointer<Void> user_data)>>

Evaluation callback for each node in the graph (set with ggml_backend_sched_set_eval_callback) when ask == true, the scheduler wants to know if the user wants to observe this node this allows the scheduler to batch nodes together in order to evaluate them in a single call

when ask == false, the scheduler is passing the node tensor to the user for observation if the user returns false, the scheduler will cancel the graph compute

Implementation

typedef ggml_backend_sched_eval_callback = ffi.Pointer<
    ffi.NativeFunction<
        ffi.Bool Function(ffi.Pointer<ggml_tensor> t, ffi.Bool ask,
            ffi.Pointer<ffi.Void> user_data)>>;