package owl-base

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file owl_algodiff_types.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 1 "src/base/algodiff/owl_algodiff_types.ml"
module Make (A : Owl_types_ndarray_algodiff.Sig) = struct
  type t =
    | F of A.elt
    | Arr of A.arr
    (* primal, tangent, tag *)
    | DF of t * t * int
    (* primal, adjoint, op, fanout, tag, tracker *)
    | DR of t * t ref * op * int ref * int * int ref

  and adjoint = t -> t ref -> (t * t) list -> (t * t) list

  and register = t list -> t list

  and label = string * t list

  and op = adjoint * register * label
end