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

More monomorphic library modules would be appreciated #132

Closed
athas opened this issue Oct 2, 2023 · 3 comments
Closed

More monomorphic library modules would be appreciated #132

athas opened this issue Oct 2, 2023 · 3 comments
Assignees

Comments

@athas
Copy link
Contributor

athas commented Oct 2, 2023

From what I can see, the only instances of MONO_ARRAY provided in the MLKit Basis Library are CharArray, RealArray, and Word8Array. It would be nice to also have Int8Array, Int16Array, Int32Array, Int64Array, Word8Array, Word16Array, Word32Array, Word64Array, Real32Array, Real64Array, BoolArray, and their vector counterparts. An efficient implementation of these will need (relatively simple) compiler support.

@melsman
Copy link
Owner

melsman commented Oct 5, 2023

Perhaps we can implement many of these structures using the PackWord<N>Little and PackWord<N>Big structures. We currently have PackWord32Little and PackWord32Big structures, which are naively implemented, but that can change later. It is straightforward also to implement 64-bit versions and 16-bit versions...

@athas
Copy link
Contributor Author

athas commented Oct 5, 2023

I tried something like that, but I found it quite infuriating to try to construct an Int32 from four Word8s, without Overflow errors. SML is not a very good language for bit fiddling.

@melsman
Copy link
Owner

melsman commented Nov 24, 2023

Fixed by #151 and #150 . From C, all mono-arrays use the String representation (see Tagging.h).

@melsman melsman self-assigned this Nov 24, 2023
@melsman melsman closed this as completed Nov 24, 2023
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

2 participants