|
libtma 0.3.13-dev.9013
QE C++ library
|
Plain-data packers for libtma results in Emscripten (Embind) bindings. More...
#include <libqe/bind/emscripten.hpp>#include <libtma/accumulation.hpp>#include <emscripten/bind.h>#include <emscripten/val.h>#include <string>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | qe |
| namespace | qe::bind |
| namespace | qe::bind::js |
| namespace | qe::bind::js::tma_fn |
Functions | |
| inline ::emscripten::val | qe::bind::js::to_js (const qe::UnitNetworks &r) |
| inline ::emscripten::val | qe::bind::js::to_js (const qe::UnitAccumulation &r) |
| inline ::emscripten::val | qe::bind::js::to_js (const qe::TensorNetworks &r) |
| val | qe::bind::js::tma_fn::connection_matrix (const val &ground_data, int gn, const val &response_data, int rn, double response_weight, bool ordered) |
| val | qe::bind::js::tma_fn::accumulate_stanza (const val &data, int rows, int cols, int window_back, int window_forward, bool binary, bool ordered) |
| val | qe::bind::js::tma_fn::row_connections (const val &data, int rows, int cols, bool binary) |
| val | qe::bind::js::tma_fn::rolling_window_sum (const val &data, int rows, int cols, int window_size) |
| int | qe::bind::js::tma_fn::flat_index (const val &indices_val, const val &dims_val) |
| val | qe::bind::js::tma_fn::accumulate_unit (const val &codes_data, int rows, int cols, const val &unit_rows_val, const val &decay_fn_js, bool ordered) |
| val | qe::bind::js::tma_fn::accumulate_unit_with_rows (const val &codes_data, int rows, int cols, const val &unit_rows_val, const val &decay_fn_js, bool ordered) |
| val | qe::bind::js::tma_fn::tensor_unit_impl (const val &tensor_val, const val &dims_val, const val &dims_sender_val, const val &dims_receiver_val, const val &dims_mode_val, const val &context_lookup_val, int cl_rows, int cl_cols, const val &unit_rows_val, const val &codes_val, int rows, int cols, const val ×_val, bool ordered, bool misses) |
| val | qe::bind::js::tma_fn::accumulate_tensor_unit (const val &tensor_val, const val &dims_val, const val &dims_sender_val, const val &dims_receiver_val, const val &dims_mode_val, const val &context_lookup_val, int cl_rows, int cl_cols, const val &unit_rows_val, const val &codes_val, int rows, int cols, const val ×_val, bool ordered) |
| val | qe::bind::js::tma_fn::accumulate_tensor_unit_misses (const val &tensor_val, const val &dims_val, const val &dims_sender_val, const val &dims_receiver_val, const val &dims_mode_val, const val &context_lookup_val, int cl_rows, int cl_cols, const val &unit_rows_val, const val &codes_val, int rows, int cols, const val ×_val, bool ordered) |
| qe::WeightModel | qe::bind::js::tma_fn::weight_model_from_val (const val &weight) |
| val | qe::bind::js::tma_fn::aggregate_row_connections_d (const val &row_conn_val, int rows, int cols, int n_codes, bool ordered, const val &weight, bool diagonal) |
| val | qe::bind::js::tma_fn::aggregate_row_connections (const val &row_conn_val, int rows, int cols, int n_codes, bool ordered, const val &weight) |
| val | qe::bind::js::tma_fn::finalize_row_connections_d (const val &row_conn_val, int rows, int cols, int n_codes, bool ordered, const val &weight, bool diagonal) |
| val | qe::bind::js::tma_fn::finalize_row_connections (const val &row_conn_val, int rows, int cols, int n_codes, bool ordered, const val &weight) |
| val | qe::bind::js::tma_fn::accumulate_unit_networks_d (const val &tensor_val, const val &dims_val, const val &dims_sender_val, const val &dims_receiver_val, const val &dims_mode_val, const val &context_lookup_val, int cl_rows, int cl_cols, const val &unit_rows_val, const val &codes_val, int rows, int cols, const val ×_val, bool ordered, const val &weight, bool misses, bool diagonal) |
| val | qe::bind::js::tma_fn::accumulate_unit_networks (const val &tensor_val, const val &dims_val, const val &dims_sender_val, const val &dims_receiver_val, const val &dims_mode_val, const val &context_lookup_val, int cl_rows, int cl_cols, const val &unit_rows_val, const val &codes_val, int rows, int cols, const val ×_val, bool ordered, const val &weight, bool misses) |
| val | qe::bind::js::tma_fn::weight_rows (const val &rows_val, int rows, int cols, bool ordered, const val &weight) |
| val | qe::bind::js::tma_fn::finalize_self_connections (const val &row_conn_val, int rows, int cols, int n_codes, bool ordered, const val &weight) |
| val | qe::bind::js::tma_fn::aggregate_self_connections (const val &row_conn_val, int rows, int cols, int n_codes, bool ordered, const val &weight) |
| void | qe::bind::js::register_connection_matrix () |
| void | qe::bind::js::register_accumulate_stanza () |
| void | qe::bind::js::register_row_connections () |
| void | qe::bind::js::register_rolling_window_sum () |
| void | qe::bind::js::register_flat_index () |
| void | qe::bind::js::register_accumulate_unit () |
| void | qe::bind::js::register_accumulate_unit_with_rows () |
| void | qe::bind::js::register_accumulate_tensor_unit () |
| void | qe::bind::js::register_accumulate_tensor_unit_misses () |
| void | qe::bind::js::register_aggregate_row_connections () |
| void | qe::bind::js::register_finalize_row_connections () |
| void | qe::bind::js::register_finalize_self_connections () |
| void | qe::bind::js::register_weight_rows () |
| void | qe::bind::js::register_accumulate_unit_networks () |
| void | qe::bind::js::register_aggregate_self_connections () |
| void | qe::bind::js::register_libtma () |
| All of libtma's functions. | |
Plain-data packers for libtma results in Emscripten (Embind) bindings.
Results cross the boundary as plain JS objects, not registered Embind classes, matching libqe-wasm's conventions (and its exact output types):
UnitNetworks → { networks: rowvec_to_js, row_networks: {data, rows, cols} } TensorNetworks → { connection_counts: number[], row_connection_counts: {data, rows, cols}, miss_counts?: number[], (misses only) row_miss_counts?: {data, rows, cols} } (misses only)
It also holds the bindings themselves (namespace qe::bind::js::tma_fn) and one registration function per libtma function (register_<name>, plus register_libtma for all of them), so every module that exposes them – tma-wasm's dist/libtma, rena-wasm's dist/libena – shares one definition. Call them from an EMSCRIPTEN_BINDINGS block.
Requires Emscripten; never included by libtma.hpp. Array conversion comes from libqe/bind/emscripten.hpp.