Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align tflite::BufferPlan properly (#2698)
In the non_persistent_buffer_planner_shim_test, a tflite::BufferPlan is created using a statically allocated buffer. A static array is allocated and the address of it is used with a reinterpret_cast. This is undefined behavior, as it could result in misaligned member accesses. This PR forces the statically allocated array to align as if it was a tflite::BufferPlan, and then uses placement new to construct it within the buffer. BUG=none
- Loading branch information