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

ffi: Extract some serialization methods for use in other files. #444

Merged
merged 4 commits into from
Jun 16, 2024

Conversation

LinZhihao-723
Copy link
Member

Description

In the current IR stream implementation, serialization methods are made as local methods so they cannot be reused in other files. However, some methods are reuseable when we implement the next IR format. This PR moves some of the general methods to util files to make them reusable. Methods moved including:

  • serialie_metadata: This general method serializes a JSON object as the IR stream metadata. It can be reused when creating a new format IR stream.
  • serialize_int: This general integer sterilization method will be wildly used in integer value encoding in the coming format.

Notice that minor refactoring is also introduced to meet our latest coding standard when moving these methods.

Validation performed

Ensured the code can be successfully built with all unit tests passed.

Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the PR title, how about:

ffi: Extract some serialization methods for use in other files.

@LinZhihao-723
Copy link
Member Author

For the PR title, how about:

ffi: Extract some serialization methods for use in other files.

lgtm

@LinZhihao-723 LinZhihao-723 changed the title ffi: Generailize helper methods for IR streaming serialization. ffi: Extract some serialization methods for use in other files. Jun 16, 2024
@LinZhihao-723 LinZhihao-723 merged commit c9c9548 into y-scope:main Jun 16, 2024
11 checks passed
jackluo923 pushed a commit to jackluo923/clp that referenced this pull request Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants