Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bigarray support #68

Closed
dbuenzli opened this issue Jan 12, 2014 · 9 comments
Closed

Bigarray support #68

dbuenzli opened this issue Jan 12, 2014 · 9 comments

Comments

@dbuenzli
Copy link
Contributor

I see that JavaScript's typed array have now been bound to. Are there any plan to support bigarrays by implementing them on top of typed arrays ?

@vouillon
Copy link
Member

Do you have a use case for that?

I'm wondering whether we should aim for a full implementation of bigarrays, or only focus on a subset that maps well to typed arrays (1 dimension, C layout, no complex numbers nor 64 bit integers).

@gasche
Copy link

gasche commented Jan 20, 2014

I never actually met a bigarray with dimension bigger than 1 in OCaml source code, while 1-dimensional bigarrays are frequent (though typically for mmap-support and simpler C FFI, use cases which may not apply to js_of_ocaml code).

@avsm
Copy link

avsm commented Jan 20, 2014

Agreed. I can't imagine anyone is really aiming for FORTRAN compatibility with Bigarrays in JavaScript. My dominant use for them is to handle external memory buffers as 1D char arrays (which works well with typed arrays).

-anil

On 20 Jan 2014, at 13:40, gasche notifications@github.com wrote:

I never actually met a bigarray with dimension bigger than 1 in OCaml source code, while 1-dimensional bigarrays are frequent (though typically for mmap-support and simpler C FFI, use cases which may not apply to js_of_ocaml code).


Reply to this email directly or view it on GitHub.

@dbuenzli
Copy link
Contributor Author

For me it's mainly for graphics purposes, raster and geometrical data. In that context, 1 dimension, C layout is what I use.

@gasche
Copy link

gasche commented Jan 21, 2014

In case anyone wonders whether that implementation is compatible with the change on Bigarrays in trunk (or with the previous implementation), the answer is yes. Said change preserved the numerical values of existing kinds, and added a new kind value as the next consecutive integer, so using old-or-new kinds to address values in an array will work as long as it has one extra element for the new kind -- which Jérôme was careful enough to do.

@kit-ty-kate
Copy link
Member

Maybe it should be installed like unix.js or the other installed javascript files and added to the META file with linkopts(javascript,pkg_bigarray) += "+js_of_ocaml/bigarray.js" ?

@hhugo
Copy link
Member

hhugo commented Apr 8, 2014

@dbuenzli, @gasche, @avsm, other Bigarray user,
any pro/cons(/test) regarding the full bigarray support #132 wrt perfs ?

@dbuenzli
Copy link
Contributor Author

dbuenzli commented Apr 8, 2014

Sorry have nothing to test against at the moment.

@avsm
Copy link

avsm commented Apr 8, 2014

Not had a chance to test it myself, but just having any (slow or fast) support is great...@dbuenzli will probably care more due to his Vz work

vouillon added a commit that referenced this issue Oct 29, 2024
Rename `cps_calls` into `trampolined_calls` for clarity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants