search for: cast_to_shared_irreversible

Displaying 3 results from an estimated 3 matches for "cast_to_shared_irreversible".

2020 Nov 18
2
Should I add intrinsics to write my own automatic reference counting passes?
...es 3. pass for turning shared_ptr to nonshared_ptr 4. pass for eliding acquire/release 5, pass that substitute the custom intrinsics to function call 6. full optimization passes I think about having the following intrinsics: ptr = cast_untyped_to_nonshared(ptr) // e.g. used after allocation ptr = cast_to_shared_irreversible(ptr) // basically a gateway to other threads nonhared_acquire(ptr) nonshared_release(ptr) shared_acquire(ptr) shared_release(ptr) I also want weak_ptr at a later stage, but leave it out for now to keep the complexity manageble. Is this idea completely unreasonable? Ola. -------------- next par...
2020 Nov 18
0
Should I add intrinsics to write my own automatic reference counting passes?
...shared_ptr > 4. pass for eliding acquire/release > 5, pass that substitute the custom intrinsics to function call > 6. full optimization passes > > I think about having the following intrinsics: > > ptr = cast_untyped_to_nonshared(ptr) // e.g. used after allocation > ptr = cast_to_shared_irreversible(ptr) // basically a gateway to other threads > nonhared_acquire(ptr) > nonshared_release(ptr) > shared_acquire(ptr) > shared_release(ptr) > > I also want weak_ptr at a later stage, but leave it out for now to keep the complexity manageble. > > Is this idea completely unr...
2020 Nov 19
1
Should I add intrinsics to write my own automatic reference counting passes?
...r eliding acquire/release >> 5, pass that substitute the custom intrinsics to function call >> 6. full optimization passes >> >> I think about having the following intrinsics: >> >> ptr = cast_untyped_to_nonshared(ptr) // e.g. used after allocation >> ptr = cast_to_shared_irreversible(ptr) // basically a gateway to >> other threads >> nonhared_acquire(ptr) >> nonshared_release(ptr) >> shared_acquire(ptr) >> shared_release(ptr) >> >> I also want weak_ptr at a later stage, but leave it out for now to >> keep the complexity manage...