The previous policy classes utilize the COO virtual functions for supporting different policies. However, virtual function is a run-time feature which rely on an actual object in memory with indirect call using vtables. This would cost both memory and run-time cycles. This PR replace the runtime objects with static classes and rely on compile-time template parameters to decide coherence policy. The derived coherence functions are implemented using overload rather than override.
The previous policy classes utilize the COO virtual functions for supporting different policies. However, virtual function is a run-time feature which rely on an actual object in memory with indirect call using vtables. This would cost both memory and run-time cycles. This PR replace the runtime objects with static classes and rely on compile-time template parameters to decide coherence policy. The derived coherence functions are implemented using overload rather than override.