package arrayjit

  1. Overview
  2. Docs
An array language compiler with multiple backends (CPU, CUDA, Metal), staged compilation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.6.0.4.tar.gz
md5=5beaaa0b377bec3badffffbf9f4dec4a
sha512=a37a67452746143f0f5ba2e81f98d6fed31fb4397e0a85f4a35aedc805b4e0405ea89d465c6f80941c465fb61d5d6119806cb73b5c5ead925797eb80d19c5ade

doc/arrayjit.ppx_arrayjit/Ppx_arrayjit/Ppx_helper/index.html

Module Ppx_arrayjit.Ppx_helperSource

Sourceval dim_spec_to_string : [< `Batch_dims of Base.Int.t | `Input_dims of Base.Int.t | `Output_dims of Base.Int.t ] -> Base.String.t
Sourceval ndarray_constant : Ppxlib.expression -> Ppxlib.expression * Astlib.Ast_502.Parsetree.expression Base.List.t * Astlib.Ast_502.Parsetree.expression Base.List.t * Astlib.Ast_502.Parsetree.expression Base.List.t
Sourceval substitute_identifiers_in_einsum_spec : loc:Ppxlib.Location.t -> Base.String.t -> Astlib.Ast_502.Parsetree.expression

Convert a string containing patterns like "identifier*" to an OCaml expression that substitutes the identifiers with their runtime values. Identifiers match the pattern a-z_a-z0-9_* and must directly precede '*'.

Example usage: substitute_identifiers_in_string ~loc "a *x + b * y" generates an expression equivalent to: String.concat "" [Int.to_string a; " *x + "; Int.to_string b; " * y"]

So if a = 2 and b = 3, the result would be "2 *x + 3 * y". Whitespace between identifiers and '*' is preserved.

OCaml

Innovation. Community. Security.