WasmBuffer

WasmBuffer

WasmBuffer

Constructor

new WasmBuffer(exports, size, dtype)

Source:
Parameters:
Name Type Description
exports Object

The exports object from Go WASM.

size number

Number of elements.

dtype string

Data type (float64, float32, etc.).

Methods

dispose()

Description:
  • Disposes of the temporary buffer.

Source:

pull() → {NDArray}

Description:
  • Pulls data from the WASM buffer back to JS (returns a copy).

Source:
Returns:
Type
NDArray

push()

Description:
  • Synchronizes JS data into the WASM buffer.

Source:

refresh()

Description:
  • Refreshes the view into WASM memory.

Source: