tite
The TITE library provides type erasure implementation utilizing the tag_invoke paradigm proposed for standardization here: https://open-std.org/JTC1/SC22/WG21/docs/papers/2019/p1895r0.pdf. The implementation contained herein is largely modeled after that provided in the standardization proposal and available at https://godbolt.org/z/3TvO4f. Significant modification have been made to the original implementation to improve its suitability to be utilized for GPU architectures. In particular the implementation: - only requires a C++14 standard. - has been extended to obtain vtables for GPU device architectures in addition to CPU host architectures. - provides a gpu_allocator class appropriate for allocation of the type-erased object to GPU memory - provides copy semantics omitted from the original implementation-- - generally the copy semantics are to completely copy the type-erased object - when the usage of the type-erased object guarantees immutability the copy semantics are altered to reference-counted shallow copies (copies of pointers) for improved performance