|
libqe 0.2.6-dev.9001
QE C++ library
|
Armadillo ↔ JavaScript conversion helpers for Emscripten (WASM) bindings. More...
#include <emscripten/bind.h>#include <emscripten/val.h>#include <armadillo>#include <vector>#include "../validate.hpp"Go to the source code of this file.
Namespaces | |
| namespace | qe |
| namespace | qe::bind |
| namespace | qe::bind::js |
Functions | |
| arma::mat | qe::bind::js::js_to_mat (const emscripten::val &data, int rows, int cols) |
| arma::imat | qe::bind::js::js_to_imat (const emscripten::val &data, int rows, int cols) |
| emscripten::val | qe::bind::js::mat_to_js (const arma::mat &m) |
| emscripten::val | qe::bind::js::rowvec_to_js (const arma::rowvec &v) |
Armadillo ↔ JavaScript conversion helpers for Emscripten (WASM) bindings.
Matrix convention: JavaScript typed arrays are row-major, Armadillo is column-major. Matrices cross the boundary as a flat row-major array plus explicit rows/cols, and are returned as plain JS objects { data: Float64Array, rows: number, cols: number }.
Requires Emscripten; never included by libqe.hpp. Include it after any ARMA_* configuration macros (e.g. ARMA_DONT_USE_BLAS), since it includes <armadillo>. Bindings typically using namespace qe::bind::js;.