Ben Vanik

Results 416 comments of Ben Vanik

Ok cool - sounds like a reproducer is worth it! I'll put one together now.

Reproducer here: https://github.com/benvanik/flatcc/commit/017023dfa53a377272b8ea8cf1eaa9bb6f33d0d1 If I run this I end up with an `output.bin` file with the vectors aligned to +8: ![image](https://user-images.githubusercontent.com/75337/115062341-1b4dbc00-9e9f-11eb-86eb-fef2590d1780.png) I tried adding the `set_min_align(B, align);` but it didn't...

I added some prints of it: ``` pre start min_align: 0 post start min_align: 0 pre end min_align: 0 post end min_align: 16 pre start min_align: 16 post start min_align:...

(sorry didn't see comment on repro) Yes - and if I set it back to 16 before ending the root then I get the correctly aligned output: ```c B->min_align =...

Ahhhh that did it! I am now calling `flatcc_builder_start_buffer(B, Eclectic_Buffer_file_identifier, 16, 0);` immediately after init'ing the builder, recording my vectors, and then using `Eclectic_FooBar_start` instead of `Eclectic_FooBar_start_as_root`. This produces results...

You're right - I may have a use for `block_align` to pad the buffer out but it's not needed here. For anyone who googles this in the future and lands...

Darn :( Do you think it'd be possible for Splitter to implement this functionality? I haven't had a chance to dig into the code but may try doing so. Does...

RE shared_ptr; this may be useful: https://github.com/google/iree/blob/main/iree/base/ref_ptr.h (thread-safe intrusive pointer with support for type-specific custom deleters to make pooling easier)

For 2 I was mainly just going off the TODO in the code and have no empirical results yet to show why anything different would be worth it besides the...

This is more about doing it at the lower level - which is required for some scenarios and really what we should be focusing on. Wherever possible we want to...