package eigen

  1. Overview
  2. Docs
Owl's OCaml interface to Eigen3 C++ library

Install

Dune Dependency

Authors

Maintainers

Sources

0.1.3.tar.gz
md5=a3e9a83a291ec1d1f57a3913a4d30e10
sha512=bf978f27d28fdac370ce71380c40bfa3e70387452cc2284f56fb6728d1af0443d064063a92d6c23e6cfe11820f1f4efb6e52a07b572453ea928133548a82bec0

doc/src/eigen/eigen_utils.ml.html

Source file eigen_utils.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14

open Bigarray
open Genarray

external change_layout: ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t = "caml_owl_change_layout"

let kind_size_in_bytes : type a b . (a, b) kind -> int = function
  | Float32 -> 4
  | Float64 -> 8
  | Complex32 -> 8
  | Complex64 -> 16
  | _ -> failwith "Eigen_types: not supported type"

let size_in_bytes x = (kind_size_in_bytes (kind x)) * (Array.fold_left ( * ) 1 (dims x))
OCaml

Innovation. Community. Security.