tqchen commented on issue #4346: [Runtime] Make ADTObject POD container type URL: https://github.com/apache/incubator-tvm/pull/4346#issuecomment-554585238 We care about alignment(otherwise it will leads to mysterious segfaults). Please use std::aligned_storage, allocate an array of if. Make sure you at least get alignof(T), and the requested alignment is dividable by alignof(T) As an alternative design, we can do ```c++ Allocator.make_with_extra_elems<ADTObject, ObjectRef>(num_elem, args); ``` Which also allows you to get std::align_of the second argument, and use https://en.cppreference.com/w/cpp/types/aligned_storage
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
