Web worker script for executing WASM computations
- Source:
Methods
(async, inner) getModuleFromDB(moduleId) → {Promise.<WebAssembly.Module>}
Retrieves a module from IndexedDB using the provided database utility
Parameters:
| Name | Type | Description |
|---|---|---|
moduleId |
string | The ID of the module in the database |
- Source:
Returns:
The instantiated module
- Type
- Promise.<WebAssembly.Module>
(inner) handleC(moduleName, funcName, data, module) → {ArrayBuffer}
function for handling parametrization of C-based Web Assembly functions
Parameters:
| Name | Type | Description |
|---|---|---|
moduleName |
String | name of the module running the script |
funcName |
String | name of the function to run in the module |
data |
Array | data object to use for the run |
module |
Object | module run containing the memory alloc functions |
- Source:
Returns:
- result buffer to be sent back from the worker
- Type
- ArrayBuffer