ManagedSharedPtr#298
Conversation
…eters working w/ record.
…cussing on make_shared as the only construction option for now.
…edPtrManager copies working correctly with umpire/chai.
…nd CHAICopyable status of type.
…Non CHAICopyable const type test.
…ehavior from non-poly types in ManagedSharedPtr.
… memory map dtor); Rename shared ptr tests to a more appropriate filename.
…t are CHAICopyable.
53b4ea9 to
b7d1cf0
Compare
|
Could you add a new CMake configuration variable? Something like CHAI_ENABLE_EXPERIMENTAL? Then in CMakeLists.txt only add the new files if CHAI_ENABLE_EXPERIMENTAL is on. |
Done, the option by default disables tests in all of the CI jobs. We probably want to keep testing experimental features so they aren't broken, wheres the best place to define that flag for Chai's CI pipeline? |
| { | ||
| for (size_t i = start; i < m_size/sizeof(T); ++i) { | ||
| m_active_base_pointer[i] = nullptr; | ||
| new (&m_active_base_pointer[i]) T(); |
There was a problem hiding this comment.
Do these changes fix other behaviors?
There was a problem hiding this comment.
Yes, it allows default construction of more complex nested chai managed types that would be elements of a managed array.
Summary
chai::expt::ManagedSharedPtr, a smart pointer enabling implicit migration of polymorphic types between host and device memory spaces.ManagedSharedPtr, you can safely copy a base shared pointer and invoke derived class functionality using the device-side v-table.This has been placed under the
exptnames space per @adayton1's request since much of the implementation is a duplicate of the underlying logic forchai::ManagedArray.This work is necessary for the Spheral GPU port.