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.1.2.tar.gz
md5=529f0921963a6eee0194159a9c0fea41
sha512=fc16e8b6cd72cb2ae18277b3727d065fa6c1d137e3187f9586fb0bfe7edeb45597cb58f389e79c20d7e3ae80661e6f9f20e0b95dcbbf27ee5688bcc571d395dd

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.