package owl-base

  1. Overview
  2. Docs
On This Page
  1. Core functions
Legend:
Library
Module
Module type
Parameter
Class
Class type
Core functions
val op_to_str : Shape.Type.op -> string

TODO

val is_random_variable : Shape.Type.op -> bool

TODO

val refnum : 'a Owl_graph.node -> int

TODO

val node_shape : Shape.Type.attr Owl_graph.node -> int array

TODO

val node_numel : Shape.Type.attr Owl_graph.node -> int

TODO

val is_shape_unknown : Shape.Type.attr Owl_graph.node -> bool

TODO

val infer_shape_graph : Shape.Type.attr Owl_graph.node array -> unit

TODO

val shape_to_str : int array option array -> string

TODO

val node_to_str : Shape.Type.attr Owl_graph.node -> string

TODO

val node_to_arr : Shape.Type.t -> Shape.Type.arr

TODO

val arr_to_node : Shape.Type.arr -> Shape.Type.t

TODO

val node_to_elt : Shape.Type.t -> Shape.Type.elt

TODO

val elt_to_node : Shape.Type.elt -> Shape.Type.t

TODO

val make_node : ?name:string -> ?value:Shape.Type.Device.value array -> ?shape:int array option array -> ?freeze:bool -> ?reuse:bool -> ?state:Shape.Type.state -> Shape.Type.op -> Shape.Type.attr Owl_graph.node

TODO

val make_then_connect : ?shape:int array option array -> Shape.Type.op -> Shape.Type.attr Owl_graph.node array -> Shape.Type.attr Owl_graph.node

TODO

val var_arr : ?shape:int array -> string -> Shape.Type.arr

TODO

val var_elt : string -> Shape.Type.elt

TODO

val const_arr : string -> Shape.Type.Device.A.arr -> Shape.Type.arr

TODO

val const_elt : string -> Shape.Type.Device.A.elt -> Shape.Type.elt

TODO

val new_block_id : unit -> int

``new_block_id ()`` returns an unused block id.

val make_empty_block : ?block_id:int -> int -> Shape.Type.block

``make_empty_block s`` returns an empty block of memory of size ``s``.

val make_value_block : Shape.Type.Device.value -> Shape.Type.attr Owl_graph.node -> unit

``make_value_block value node`` creates a block of memory initialised with ``value`` and links the new block to ``node``.

``get_block node`` returns the memory block allocated to ``node``. If no block is allocated, throws an exception.

val add_node_to_block : Shape.Type.attr Owl_graph.node -> Shape.Type.block -> unit

Link a node to a reusable block and initialises its memory on the memory of the block.

val get_active_node : Shape.Type.block -> Shape.Type.attr Owl_graph.node option

Return the node that is currently using the memory of the block.

val set_active_node : Shape.Type.block -> Shape.Type.attr Owl_graph.node -> unit

Update the node that is currently using the block of memory.

val get_block_id : Shape.Type.attr Owl_graph.node -> int

``get_block_id node`` returns the id of the block assigned to ``node``. If ``node`` has not been assigned yet, returns ``-1``.

val set_value : Shape.Type.attr Owl_graph.node -> Shape.Type.Device.value array -> unit

TODO

val set_operator : Shape.Type.attr Owl_graph.node -> Shape.Type.op -> unit

TODO

TODO

val set_reuse : Shape.Type.attr Owl_graph.node -> bool -> unit

TODO

val get_reuse : Shape.Type.attr Owl_graph.node -> bool

TODO

val is_shared : Shape.Type.attr Owl_graph.node -> bool

TODO

``get_shared_nodes node`` returns the nodes sharing the same block of memory as ``node``.

val is_var : Shape.Type.attr Owl_graph.node -> bool

TODO

val is_const : Shape.Type.attr Owl_graph.node -> bool

TODO

val is_node_arr : Shape.Type.attr Owl_graph.node -> bool

TODO

val is_node_elt : Shape.Type.attr Owl_graph.node -> bool

TODO

val is_assigned : Shape.Type.attr Owl_graph.node -> bool

``is_assigned node`` checks if a block of memory has been assigned to ``node``.

val check_assigned : Shape.Type.attr Owl_graph.node -> unit

``check_assigned node`` throws an exception if ``node`` has not been assigned to a block.

val is_valid : Shape.Type.attr Owl_graph.node -> bool

TODO

val validate : Shape.Type.attr Owl_graph.node -> unit

TODO

val invalidate : Shape.Type.attr Owl_graph.node -> unit

TODO

val invalidate_graph : Shape.Type.attr Owl_graph.node -> unit

TODO

val is_freeze : Shape.Type.attr Owl_graph.node -> bool

TODO

val freeze : Shape.Type.attr Owl_graph.node -> unit

TODO

val freeze_descendants : Shape.Type.attr Owl_graph.node array -> unit

TODO

val freeze_ancestors : Shape.Type.attr Owl_graph.node array -> unit

TODO

TODO

TODO

val unsafe_assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit

TODO

val assign_arr : Shape.Type.arr -> Shape.Type.Device.A.arr -> unit

TODO

val assign_elt : Shape.Type.elt -> Shape.Type.Device.A.elt -> unit

TODO

val float_to_elt : float -> Shape.Type.elt

TODO

val elt_to_float : Shape.Type.elt -> float

TODO

OCaml

Innovation. Community. Security.