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

A function Bigarray.kind_byte_size is missing #6263

Closed
vicuna opened this issue Dec 7, 2013 · 5 comments

Comments

Projects
None yet
1 participant
@vicuna
Copy link

commented Dec 7, 2013

Original bug ID: 6263
Reporter: @dbuenzli
Status: closed (set by @damiendoligez on 2016-01-27T15:05:32Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.01.0
Fixed in version: 4.03.0+dev / +beta1
Category: otherlibs
Related to: #6064
Monitored by: @gasche @hcarty

Bug description

A function:

val Bigarray.kind_byte_size : ('a, 'b) kind -> int
(** [kind_byte_size k] is the length in bytes of an elements stored in a bigarray of kind [k]. *)

is useful in various contexts and cannot be written without resorting to Obj.magic.

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 15, 2013

Comment author: @dbuenzli

Btw exposing caml_ba_byte_size as :

val Bigarray.byte_size : ('a, 'b, 'c) t -> int

would be nice too.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 9, 2014

Comment author: @yallop

#6064 makes it possible to write kind_byte_size and byte_size without Obj.magic.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 12, 2014

Comment author: @dbuenzli

Cool, but that's still a function that I already cut and pasted a few times now. You'll most likely need it as soon as you are interfacing polymorphic bigarrays with C code.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 27, 2016

Comment author: @damiendoligez

See #236 (#236).

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 27, 2016

Comment author: @damiendoligez

Fixed in trunk (commit 192ccd0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.