Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004909OCamlOCaml otherlibspublic2009-11-04 20:382013-09-05 02:45
Reportergoswin 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0004909: int31 type for Bigarray
DescriptionI currently have the problem that I want to read/write 31bit signed integer values to a Bigarray. The bigarray acts as a buffer that is stored on disk or restored from it from a C library.

On a 32bit CPU I can just use (int, int, c_layout) Array1.t but on a 64bit CPU I need to use (int32, int32, c_layout) Array1.t. This means I need 2 flavours of the code depending on the number of bits the cpu has.

It would be nice if there were a (int, int31_elt) kind in Bigarray allowing the use of int on 32bit and 64bit platforms.

Tagspatch
Attached Filespatch file icon int31.patch [^] (7,686 bytes) 2009-11-13 20:42 [Show Content]

- Relationships

-  Notes
(0005148)
goswin (reporter)
2009-11-04 20:41

The reason I limited myself to 31bit ints and want to use (int, int, c_layout) Array1.t is speed. The overhead for int32 in the code is substantial, even when just converting to/from int32 on array read/write. The code runs a lot slower on 64bit.

- Issue History
Date Modified Username Field Change
2009-11-04 20:38 goswin New Issue
2009-11-04 20:41 goswin Note Added: 0005148
2009-11-13 20:42 goswin File Added: int31.patch
2009-12-08 17:31 doligez Status new => acknowledged
2012-06-21 20:16 frisch Category OCaml general => OCaml otherlibs
2013-09-04 18:16 doligez Tag Attached: patch


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker