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

Monomorphic word-n-vectors and arrays #150

Merged
merged 9 commits into from
Nov 23, 2023
Merged

Monomorphic word-n-vectors and arrays #150

merged 9 commits into from
Nov 23, 2023

Conversation

melsman
Copy link
Owner

@melsman melsman commented Nov 17, 2023

This PR aims at providing support for monomorphic WordNVector and WordNArray structures for more values of N than is currently supported (Word8Vector and. Word8Array). For straightforward FFI-support, the scalars inside the vectors and arrays should be represented untagged, also when GC is enabled.

  • Rename the file wordtables.sml to polytable.sml and the WordTable functor in the file to PolyTable (applied in Array.sml and Vector.sml).
  • Create a generic WordNTable functor that takes sufficient arguments to implement supersets of the MONO_ARRAY and MONO_VECTOR signatures.
  • Create a generic WordNTableSlice functor that takes sufficient arguments to implement supersets of the MONO_ARRAY_SLICE and MONO_VECTOR_SLICE signatures.
  • Implement backend support for bytetable_sub_wordN and bytetable_update_wordN for N=16, N=31, N=32ub, N=32b, N=63, N=64ub, N=64b.
  • Instantiate the functors with arguments appropriate for Word31, Word32, Word64, and Word.
  • Implement Word63 structure and instantiate the functors for this word size.
  • Implement Word16 structure and instantiate the functors for this word size.
  • Instantiate functors on booleans to get BoolVector and friends.
  • Vector tests.
  • Vector slice tests.
  • Array tests.
  • Array slice tests.
  • New structures RealVectorSlice and RealArraySlice by instantiating functors.
  • Many more structures matching the MONO_ARRAY2 signature.

We will deal with int-n-vectors and arrays in a separate PR.

@melsman melsman self-assigned this Nov 17, 2023
@melsman melsman marked this pull request as draft November 22, 2023 00:16
@melsman melsman marked this pull request as ready for review November 23, 2023 16:56
@melsman melsman merged commit 3201b6d into master Nov 23, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant