sig
  type ('data, 'kind) atimesfn =
      ('data, 'kind) Nvector.t -> ('data, 'kind) Nvector.t -> unit
  type psetupfn = unit -> unit
  type ('data, 'kind) psolvefn =
      ('data, 'kind) Nvector.t ->
      ('data, 'kind) Nvector.t -> float -> bool -> unit
  type ('matrix, 'data, 'kind, 'lsolver) ops = {
    solver_type : Sundials_LinearSolver.linear_solver_type;
    solver_id : Sundials_LinearSolver.linear_solver_id;
    init : ('lsolver -> unit) option;
    setup : ('lsolver -> 'matrix -> unit) option;
    solve : 'lsolver -> 'matrix -> 'data -> 'data -> float -> unit;
    set_atimes :
      ('lsolver ->
       ('data, 'kind) Sundials_LinearSolver.Custom.atimesfn -> unit)
      option;
    set_preconditioner :
      ('lsolver ->
       Sundials_LinearSolver.Custom.psetupfn option ->
       ('data, 'kind) Sundials_LinearSolver.Custom.psolvefn option -> unit)
      option;
    set_scaling_vectors :
      ('lsolver -> 'data option -> 'data option -> unit) option;
    set_zero_guess : ('lsolver -> bool -> unit) option;
    get_num_iters : ('lsolver -> int) option;
    get_res_norm : ('lsolver -> float) option;
    get_res_id : ('lsolver -> ('data, 'kind) Nvector.t) option;
    get_last_flag : ('lsolver -> int) option;
    get_work_space : ('lsolver -> int * int) option;
    set_prec_type :
      ('lsolver ->
       Sundials_LinearSolver.Iterative.preconditioning_type -> unit)
      option;
  }
  val make_ops :
    ?solver_id:Sundials_LinearSolver.linear_solver_id ->
    ?init:('lsolver -> unit) ->
    ?setup:('lsolver -> 'matrix -> unit) ->
    ?set_atimes:('lsolver ->
                 ('data, 'kind) Sundials_LinearSolver.Custom.atimesfn -> unit) ->
    ?set_preconditioner:('lsolver ->
                         Sundials_LinearSolver.Custom.psetupfn option ->
                         ('data, 'kind) Sundials_LinearSolver.Custom.psolvefn
                         option -> unit) ->
    ?set_scaling_vectors:('lsolver -> 'data option -> 'data option -> unit) ->
    ?set_zero_guess:('lsolver -> bool -> unit) ->
    ?get_num_iters:('lsolver -> int) ->
    ?get_res_norm:('lsolver -> float) ->
    ?get_res_id:('lsolver -> ('data, 'kind) Nvector.t) ->
    ?get_last_flag:('lsolver -> int) ->
    ?get_work_space:('lsolver -> int * int) ->
    ?set_prec_type:('lsolver ->
                    Sundials_LinearSolver.Iterative.preconditioning_type ->
                    unit) ->
    solver_type:Sundials_LinearSolver.linear_solver_type ->
    solve:('lsolver -> 'matrix -> 'data -> 'data -> float -> unit) ->
    unit ->
    ('matrix, 'data, 'kind, 'lsolver) Sundials_LinearSolver.Custom.ops
  val make_with_matrix :
    ('matrix, 'data, 'kind, 'lsolver) Sundials_LinearSolver.Custom.ops ->
    ?context:Sundials.Context.t ->
    'lsolver ->
    ('matrixkind, 'matrix, 'data, 'kind) Sundials.Matrix.t ->
    ('matrix, 'data, 'kind, [ `Custom of 'lsolver | `Dls | `Iter ])
    Sundials_LinearSolver.t
  val make_without_matrix :
    (unit, 'data, 'kind, 'lsolver) Sundials_LinearSolver.Custom.ops ->
    ?context:Sundials.Context.t ->
    'lsolver ->
    (unit, 'data, 'kind, [ `Custom of 'lsolver | `Iter | `MatE ])
    Sundials_LinearSolver.t
  val unwrap :
    ('m, 'data, 'kind, [> `Custom of 'lsolver ]) Sundials_LinearSolver.t ->
    'lsolver
  type ('matrix, 'data, 'kind, 'lsolver) dls_ops = {
    init : ('lsolver -> unit) option;
    setup : ('lsolver -> 'matrix -> unit) option;
    solve : 'lsolver -> 'matrix -> 'data -> 'data -> float -> unit;
    space : ('lsolver -> int * int) option;
  }
  val make_dls :
    ('matrix, 'data, 'kind, 'lsolver) Sundials_LinearSolver.Custom.dls_ops ->
    ?context:Sundials.Context.t ->
    'lsolver ->
    ('matrixkind, 'matrix, 'data, 'kind) Sundials.Matrix.t ->
    ('matrix, 'data, 'kind, [ `Custom of 'lsolver | `Dls ])
    Sundials_LinearSolver.t
end