From 90834fbb937fdce1acf7861fdb64d36c0d2021f4 Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Wed, 11 Dec 2024 12:59:57 -0800 Subject: [PATCH] Adapt `symmetric_kernel` for non-WASM targets The examples call `engine::realize_gram`, which now includes a call to `symmetric_kernel`, so we need to make sure that `symmetric_kernel` can run on whatever target Cargo uses for examples. For that target on my machine, `console::log_1` panics with the message "function not implemented on non-`wasm32` targets". --- app-proto/src/engine.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app-proto/src/engine.rs b/app-proto/src/engine.rs index a48a1af..2f06035 100644 --- a/app-proto/src/engine.rs +++ b/app-proto/src/engine.rs @@ -111,9 +111,14 @@ impl ConfigSubspace { ) ) ); + + /* DEBUG */ + // print the eigenvalues + #[cfg(all(target_family = "wasm", target_os = "unknown"))] console::log_1(&JsValue::from( - format!("Hessian eigenvalues: {}", eig.eigenvalues) - )); /* DEBUG */ + format!("Eigenvalues used to find kernel: {}", eig.eigenvalues) + )); + ConfigSubspace(basis.collect()) }