[quickjs-devel] Sharing a Float32Array from C

  • From: Jerry Sievert <jerry@xxxxxxxxxxxxxxxxxxxxxx>
  • To: quickjs-devel@xxxxxxxxxxxxx
  • Date: Mon, 16 Sep 2019 13:21:43 -0700

Hi,

I’m looking for an example of making a Float32Array available from C, with 
direct access.

You can do this with Duktape by using buffers (duk_push_external_buffer) and 
the type DUK_BUFOBJ_FLOAT32ARRAY

I know I can use JS_NewArrayBuffer but it appears to default to 8-bit

Thanks!


Attachment: signature.asc
Description: Message signed with OpenPGP

Other related posts:

  • » [quickjs-devel] Sharing a Float32Array from C - Jerry Sievert