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

Environment Macro Property IO #1087

Merged
merged 6 commits into from
Sep 22, 2023
Merged

Environment Macro Property IO #1087

merged 6 commits into from
Sep 22, 2023

Conversation

Robadob
Copy link
Member

@Robadob Robadob commented Jul 7, 2023

Ended up refactoring much of the internal model state IO interface to make partial import/export possible.

  • BugFix: JSONStateWriter would create an agent object for each agent state, leading to multiple members with the same key.
  • Bugfix: HostMacroProperty did not use streams to copy data. (C tests still pass after this change)
  • Switch CUDAMacroEnvironment from reference to shared_ptr
  • State
    • Export
      • JSON
      • XML
    • Import
      • JSON
      • XML
    • tests
  • HostAPI
    • Export
      • JSON
      • XML
      • binary
    • Import
      • JSON
      • XML
      • binary
    • tests

Of note, macro properties can still not be initialised via EnvironmentDescription or RunPlan.

It's a basic interface change (two new methods added to HostAPI with no weird types/templates, so only C API tests have been extended/updated.

Commits are split cleanly, does not require squash.

Closes #1070

@Robadob Robadob self-assigned this Jul 7, 2023
Base automatically changed from bugfix_2023_07_07 to master July 10, 2023 14:52
@Robadob Robadob force-pushed the env_macro_property_io branch 13 times, most recently from fc1bcac to 3340dd4 Compare July 13, 2023 12:43
@Robadob Robadob marked this pull request as ready for review July 13, 2023 13:19
@Robadob Robadob requested review from mondus and ptheywood and removed request for mondus July 13, 2023 13:19
Copy link
Member

@ptheywood ptheywood left a comment

Choose a reason for hiding this comment

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

A few trivial comments added, that would be nice (and simple) to address, though not the end of the world to merge without. Can wait till you return from leave.

The change to .cu files made diffing less clear (just git issues), and will mean we have to do more of a breaking change later if we have a non cuda build, but that's going to be breaking either way.

Tests all pass under linux.

This is an API break, so will need documenting in the changelog as such for the next pre-release.

src/flamegpu/io/XMLStateWriter.cu Outdated Show resolved Hide resolved
This special method also supports raw binary IO, for exceptionally large macro propertys unsuitable for xml/json.

Added an associated test in suite IOTest3 for each of the formats.
@mondus mondus merged commit 8226cae into master Sep 22, 2023
18 checks passed
@mondus mondus deleted the env_macro_property_io branch September 22, 2023 09:38
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.

Environment Macro Property IO
3 participants